When i type /jail1 [id], that works fine, but if i type /jail2 [id] if gives the return saying USAGE: jail2 [id]
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256], tmp[256], idx;
cmd = strtok(cmdtext, idx);
if(!strcmp(cmd, "/jail1", true))
{
new id;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, 0xFF0000FF, "Usage: /jail1 [id]");
id = strval(tmp);
SetPlayerPos(id, 2756.1196,690.8884,10.8984);
return 1;
}
cmd = strtok(cmdtext, idx);
if(!strcmp(cmd, "/jail2", true))
{
new id;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, 0xFF0000FF, "Usage: /jail2 [id]");
id = strval(tmp);
SetPlayerPos(id, 2755.4023,683.8808,10.8984);
return 1;
}
cmd = strtok(cmdtext, idx);
if(!strcmp(cmd, "/jail3", true))
{
new id;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, 0xFF0000FF, "Usage: /jail3 [id]");
id = strval(tmp);
SetPlayerPos(id, 2756.1255,676.9288,10.8984);
return 1;
}
cmd = strtok(cmdtext, idx);
if(!strcmp(cmd, "/jail4", true))
{
new id;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, 0xFF0000FF, "Usage: /jail4 [id]");
id = strval(tmp);
SetPlayerPos(id, 2756.1243,668.4799,10.8984);
return 1;
}
cmd = strtok(cmdtext, idx);
if(!strcmp(cmd, "/jail5", true))
{
new id;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, 0xFF0000FF, "Usage: /jail5 [id]");
id = strval(tmp);
SetPlayerPos(id, 2755.9297,660.0413,10.8984);
return 1;
}
cmd = strtok(cmdtext, idx);
if(!strcmp(cmd, "/jail6", true))
{
new id;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, 0xFF0000FF, "Usage: /jail6 [id]");
id = strval(tmp);
SetPlayerPos(id, 2755.7139,652.2241,10.8984);
return 1;
}
cmd = strtok(cmdtext, idx);
if(!strcmp(cmd, "/jail7", true))
{
new id;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, 0xFF0000FF, "Usage: /jail7 [id]");
id = strval(tmp);
SetPlayerPos(id, 2755.5430,645.7413,10.8984);
return 1;
}
return 0;
}
Can you tell me the problem, because everytime i type any command under /jail1 if gives me the return and not make me jail the player (it is not an admin fs, just a normal jail command for cops)