How to use dialogs
#1

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
Reply
#2

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

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
Reply
#4

Can't you use sscanf to scan inputtext?
Reply
#5

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]");
Reply
#6

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

Change params to inputtext
Reply
#7

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)