nick/id - 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: nick/id (
/showthread.php?tid=69063)
nick/id -
StrickenKid - 15.03.2009
whats the coding to put into my commands so you can type nick or the id of the person for a cmd, for example
my name is "Ethan" and my id is 3
so someone would type /kick 3
OR they could do /kick Ethan
how would i do this?
Re: nick/id -
Sandra18[NL] - 15.03.2009
Seach for the "ReturnUser"-function.
I believe it is from the Godfather gamemode
Re: nick/id -
Zoopaman - 15.03.2009
If you use strtok:
pawn Code:
value-you-wish-to-save-the-user = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
Re: nick/id -
Weirdosport - 15.03.2009
I would use the "u" function of sscanf. I find it highly preferable over the alternatives mentioned.
Link.
Re: nick/id -
StrickenKid - 15.03.2009
Ok Thanks allot i got Returnuser and Isnumeric (needed with returnuser) but i dont really understand how to put it into a cmd, can someone please give me an example command using it? thanks!