nick/id
#1

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

Seach for the "ReturnUser"-function.

I believe it is from the Godfather gamemode
Reply
#3

If you use strtok:
pawn Code:
value-you-wish-to-save-the-user = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
Reply
#4

I would use the "u" function of sscanf. I find it highly preferable over the alternatives mentioned.

Link.
Reply
#5

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!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)