Army only command
#3

Quote:
Originally Posted by MEC
Посмотреть сообщение
i'm trying to limit a /air command from an Airstrike FS only to TEAM_ARMY

Код:
//Airstrike command, Army only, Hoorah!
	if(strcmp(cmd, "/air", true) == 0) (
	if(IsPlayerConnected(playerid)) (
	if(IsSpawned[playerid] == 0) (
	SendClientMessage(playerid, COLOR_ERROR, "Your are dead. You cannot use this command");
	return 1;
	)
	if(gTeam[playerid] != TEAM_ARMY) (
	SendClientMessage(playerid, COLOR_ERROR, "This command can only be used by the Army");
	return 1;
	)
do i do this in the FS or the GM? or am i doing this wrong all together?

when i tried to do this in the GM it gave me these errors:
Код:
MEC.pwn(6039 -- 6040) : error 029: invalid expression, assumed zero
MEC.pwn(6040) : error 001: expected token: ";", but found ")"
MEC.pwn(6040) : error 029: invalid expression, assumed zero
MEC.pwn(6040) : fatal error 107: too many error messages on one line
WTF? Using () where to use {}??
OMG!... ok, open yout gamemode and post here the command /air code
Reply


Messages In This Thread
Army only command - by MEC - 23.01.2011, 23:23
Re: Army only command - by Kitten - 23.01.2011, 23:27
Re: Army only command - by ricardo178 - 23.01.2011, 23:29
Re: Army only command - by MEC - 23.01.2011, 23:31
Re: Army only command - by PeteShag - 23.01.2011, 23:31
Re: Army only command - by Kitten - 23.01.2011, 23:34
Re: Army only command - by ricardo178 - 23.01.2011, 23:34
Re: Army only command - by MEC - 23.01.2011, 23:35
Re: Army only command - by ricardo178 - 23.01.2011, 23:36
Re: Army only command - by MEC - 23.01.2011, 23:41

Forum Jump:


Users browsing this thread: 1 Guest(s)