SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 06/08/2012, 04:56 AM   #1
San1
Huge Clucker
 
San1's Avatar
 
Join Date: Dec 2011
Posts: 287
Reputation: 2
Default a little help with a dialog

Code:
if(dialogid == DIALOG_WEAPONS)
    	{
        	if(!response) // If they clicked 'Cancel'
        	{
        		SendClientMessage(playerid,COLOR_YELLOW,"You Have Canceled The Dialog");
        	}
            if(listitem == 0)
            {
                GivePlayerWeapon(playerid, WEAPON_DEAGLE, 14);
            }
There is more to the code but line 44 is where it shows SendClientMessage

ERROR:C:\Documents and Settings\~Adrian~\Desktop\radiotest.pwn(44) : error 029: invalid expression, assumed zero
C:\Documents and Settings\~Adrian~\Desktop\test.pwn(44) : warning 215: expression has no effect
C:\Documents and Settings\~Adrian~\Desktop\test.pwn(44) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\~Adrian~\Desktop\test.pwn(44) : error 029: invalid expression, assumed zero
C:\Documents and Settings\~Adrian~\Desktop\test.pwn(44) : fatal error 107: too many error messages on one line
San1 is offline   Reply With Quote
Old 06/08/2012, 05:27 AM   #2
Devilxz97
Gangsta
 
Devilxz97's Avatar
 
Join Date: Dec 2011
Location: Malaysia
Posts: 763
Reputation: 37
Default Re: a little help with a dialog

pawn Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_WEAPONS)
    {
        if(response == 0)
        {
            SendClientMessage(playerid,COLOR_YELLOW,"You Have Canceled The Dialog");
        }
        else if(listitem == 0)
        {
            GivePlayerWeapon(playerid, WEAPON_DEAGLE, 14);
        }
      /*else if(listitem == 1)
        {
            GivePlayerWeapon(playerid, weaponid/weaponname, ammo);
        }*/

    }
    return 1;
}
try this
__________________


- Skype Name: ejam.blacklistcrew -
- Facebook Acc: http://www.facebook.com/DevConnection -

Selling Gamemode [DRIFT/FREEROAM/ROLEPLAY] for $9.99
Devilxz97 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[19:58:45] Warning: PlayerDialogResponse PlayerId: 28 dialog ID doesn't match last sent dialog ID, what it means? niels44 Scripting Help 6 13/06/2012 05:53 PM
Big problem (PlayerDialogResponse PlayerId: 57 dialog ID doesn't match last sent dialog ID) RingoRus Server Support 3 12/06/2012 05:54 PM
Dialog response not Sending Message [Input Dialog] Deal-or-die Scripting Help 8 08/05/2012 01:10 PM
[PEDIDO] Dialog em Spawn e Dialog ao Entrar no veículo ViCtOr_Mc Português/Portuguese 8 27/05/2011 05:13 PM
SetPlayerTeamFromClass(playerid, classid); from dialog with dialog Haydz Help Archive 6 28/11/2010 10:21 AM


All times are GMT. The time now is 05:59 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.