[Help]Guys i need help plz with jail command
#5

Quote:
Originally Posted by The Toni
Посмотреть сообщение
Yes, thats because you put "playerid" which means you are telling the script to jail the person typing the cmd.

You need to use strtok; or sscanf.

pawn Код:
new
        cmd[256],
        tmp[256],
        idx
    ;
    cmd = strtok(cmdtext, idx);
    if(!strcmp(cmd, "/jail", true))
    {
        new id;
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp)) return SendClientMessage(playerid, 0xFF0000FF, "Usage: /jail <id>");
       
        id = strval(tmp);
       
        SetPlayerPos(id, 2042.7137,988.9628,10.6719);
        return 1;
    }
Your welcome
Use this one.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)