How to define the playerid
#1

Hey guys, how do i define what the playerid is in
if (strcmp("/rcon commands", cmdtext, true, 10) == 0)
{

this type of Commands??
Reply
#2

What do you mean?
Reply
#3

nvm, friend helped.

New problem,
How, do i make stuff like, when the player does /kick, that it will come with a clientmessage, [USAGE] /kick [playerid]
Reply
#4

If you mean, how to create command where you can type playerid etc "/slap [ID]", create new variable that save ID, mostly used by strval(tmp) and than every command is used on it.
Reply
#5

No, i mean, that it will, Return the right usage.
Reply
#6

Use sscanf for that, you can find many examples on the forum.
Reply
#7

If your using strtok:
pawn Код:
if(!strlen(tmp)) return SendClientMessage(playerid, color, "Error: Blahblah");
If your using dcmd:
pawn Код:
if(!strlen(params)) return SendClientMessage(playerid, color, "Error: Blahblah");
If your using zcmd:
pawn Код:
if(isnull(params)) return SendClientMessage(playerid, color, "Error: Blahblah");
Reply
#8

it was the first one, thanks.
Reply
#9

Another:
SetPlayerPos(playerid,
Im trying to make /goto, but its not really that simple as i tought :P
How do i make it, that he will get Teleported to the guy?
Reply
#10

make new float x, y, z and use tmp.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)