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

Quote:
Originally Posted by zack3021
Посмотреть сообщение
I made a jail command. But when i type it, it jails me and not the player.

Код:
	if (strcmp("/jail", cmdtext, true, 10) == 0)
	{
		SetPlayerPos(playerid,2042.7137,988.9628,10.6719);
		return 1;
	}
  	return 0;
}
Use this
Код:
if (strcmp("/jail", cmdtext, true, 10) == 0)
	{
      tmp = strtok(cmdtext, idx);
                if(!strlen(tmp)) {
                    SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /jail [playerid]");
                    return 1;
                }
                new playa;
                playa = ReturnUser(tmp);
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp)) {
                    SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /jail [playerid]");
                    return 1;
                }
               SetPlayerPos(playa,2042.7137,988.9628,10.6719);
              return 1;
              }
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)