SA-MP Forums Archive
How to use dialogs - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to use dialogs (/showthread.php?tid=131486)



How to use dialogs - Torran - 03.03.2010

How do i use dialogs for IDs?

Like im making a /lend command for my privatecars,
And im using a DIALOG_STYLE_INPUT dialog,
And what code would i use so the player can put in either the players ID or Name,
What code would i use to get what they said and see if that players connected ect


Re: How to use dialogs - Correlli - 03.03.2010

http://forum.sa-mp.com/index.php?topic=130286.0


Re: How to use dialogs - Torran - 03.03.2010

Quote:
Originally Posted by Don Correlli
I know how to create dialogs i just dont know how to see if the player name or ID that the player enters on the dialog is connected/valid
And if not return a message, Like this i suppose, if(id == INVALID_PLAYER_ID),
But like it might be if(inputtext == INVALID_PLAYER_ID)
But if it is how do i save that to id or something like, inputtext = id,
Because for use in Kick(id) like that ect


Re: How to use dialogs - Rzzr - 03.03.2010

Can't you use sscanf to scan inputtext?



Re: How to use dialogs - Torran - 03.03.2010

I dont know how to use sscanf,
I only know this and ONLY this:

if (sscanf(params, "u", id)) SendClientMessage(playerid, RED, "Usage ~ /lend [PlayerID/PartOfName]");


Re: How to use dialogs - Rzzr - 03.03.2010

if (sscanf(inputtext, "u", id)) SendClientMessage(playerid, RED, "Usage ~ /lend [PlayerID/PartOfName]");

Change params to inputtext


Re: How to use dialogs - Torran - 03.03.2010

What would i change the usage to?
Please enter a ID or someting like that?


Re: How to use dialogs - Rzzr - 03.03.2010

Player not found, please enter a connected playerid/part of name.
Something like that :P