Cmds Problem!
#7

Try to do something like this :
PHP код:
if(sscanf(params"u"ID)) return SendClientMessage(playerid,COLOR_ERROR,"{CACA00}[INFO]{FFFFFF}: /rob (Player Name/ID)");
if(
ID == INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOR_ERROR,"Invalid ID. You cannot rob them");
if(
IsSpawned[playerid] != 1) return SendClientMessage(playerid,COLOR_ERROR,"{CACA00}[ERROR]{FFFFFF}You must be alive and spawned in order to be able to use this command.");
if(
gTeam[playerid] < 9) return SendClientMessage(playerid,COLOR_ERROR,"{CACA00}[ERROR]{FFFFFF}You cannot use this command with your class/skill.");
if(
gTeam[playerid] == TEAM_STUNT) return SendClientMessage(playerid,COLOR_ERROR,"{CACA00}[ERROR]{FFFFFF}You cannot use this command with your class/skill.");
if(
gTeam[ID] == TEAM_STUNT) return SendClientMessage(playerid,COLOR_ERROR,"{CACA00}[ERROR]{FFFFFF}You cannot use this command on stunters.");
if(
GetPlayerInterior(playerid) != 0) return SendClientMessage(playerid,COLOR_ERROR,"{CACA00}[ERROR]{FFFFFF}You cannot Rob someone while in an Interior");
if(
IsFrozen[playerid] == 1) return SendClientMessage(playerid,COLOR_ERROR,"{CACA00}[ERROR]{FFFFFF}You have been frozen by a Server Administrator. You cannot use this command.");
if(
InAdminMode[ID] == 1) return SendClientMessage(playerid,COLOR_ERROR,"{CACA00}[ERROR]{FFFFFF}You cannot use this command on this player because they are in Administrator mode.");
if(
IsKidnapped[playerid] >= 1)return SendClientMessage(playerid,COLOR_ERROR,"{CACA00}[ERROR]{FFFFFF}You are kidnapped. You cannot use this command.");
if(
Away[playerid] == 1) return SendClientMessage(playeridCOLOR_ERROR,"{CACA00}[ERROR]{FFFFFF}You can't rob someone while you are in AFK.");
if(
Away[ID] == 1) return SendClientMessage(playeridCOLOR_ERROR,"{CACA00}[ERROR]{FFFFFF}You can't rob someone while he is in AFK."); 
its not the full codes but you get my idea.
Reply


Messages In This Thread
Cmds Problem! - by Haz - 29.12.2015, 02:21
Re: Cmds Problem! - by zamaleksc - 29.12.2015, 02:23
Re: Cmds Problem! - by xTURBOx - 29.12.2015, 03:19
Re: Cmds Problem! - by Haz - 29.12.2015, 03:36
Re: Cmds Problem! - by Sh4d0w2 - 29.12.2015, 03:39
Re: Cmds Problem! - by Haz - 29.12.2015, 03:59
Re: Cmds Problem! - by Sh4d0w2 - 29.12.2015, 04:16
Re: Cmds Problem! - by xTURBOx - 29.12.2015, 04:37
Re: Cmds Problem! - by Haz - 29.12.2015, 05:20
Re: Cmds Problem! - by xTURBOx - 29.12.2015, 05:44

Forum Jump:


Users browsing this thread: 1 Guest(s)