13.12.2012, 05:03
Your "Else If" must contain a condition, and your "Else" statement should be part of "IsACop".
It should be like this;
It should be like this;
pawn Код:
CMD:givelicense(playerid)
{
if(IsACop(playerid))
{
if(PlayerInfo[playerid][pGunLic] == 0);//This is if they DON'T have a gun license
{
PlayerInfo[playerid][pGunLic] = 1;
SendClientMessage(playerid, COLOR_ORANGE, "This is a test");
return 1;
}
else
{
PlayerInfo[playerid][pGunLic] = 1;
SendClientMessage(playerid, COLOR_ORANGE, "They already have a Gun License");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_RED," You are not a cop!");
return 1;
}
}