04.09.2011, 13:18
So here is my code. What i'm trying to do is, when player types /bomb plant, it shows "You typed 'plant'".
But when the player typed /bomb defuse, it shows "You typed 'defuse'".
Can anyone please help me?
But when the player typed /bomb defuse, it shows "You typed 'defuse'".
Can anyone please help me?
Код:
dcmd_bomb(playerid,params[])
{
new tmp[256], Index;
new plant, defuse;
tmp = strtok(params,Index);
if(!strlen(params)) return SendClientMessage(playerid,GREY,"ERROR: /bomb [plant/defuse]");
if(strlen(tmp) == defuse)
{
SendClientMessage(playerid, GREY, "You typed 'defuse'");
return 1;
}
if(strlen(tmp) == plant)
{
SendClientMessage(playerid, GREY, "You typed 'plant'");
return 1;
}
return 1;
}



