08.12.2011, 02:26
Hey,
I have decided to be slightly lazy in my script and speed up my commands by scripting a stock function and i am just wondering if it would work, basically the gamemode i am currently working on is a Cops And Robbers. And of course i cannot have cops, CIA or medics robbing places.
Here if the function:
As you can see very simple but if someone could confirm it works that would be great thanks.
I only ask this as i am along way off complete and not thinking of adding commands at the moment.
I have decided to be slightly lazy in my script and speed up my commands by scripting a stock function and i am just wondering if it would work, basically the gamemode i am currently working on is a Cops And Robbers. And of course i cannot have cops, CIA or medics robbing places.
Here if the function:
pawn Код:
stock IsACop(playerid)
{
if(gTeam[playerid] == TEAM_COP || gTeam[playerid] == TEAM_CIA || gTeam[playerid] == TEAM_MEDIC)
{
SendClientMessage(playerid,COLOR_RED,"Law Enforcement Officers Cannot Rob Places");
}
}
I only ask this as i am along way off complete and not thinking of adding commands at the moment.