05.08.2012, 12:35
I wrote this code earlier and I'd like someone to check it and give me feedback..
Would this work?
pawn Код:
cmd:givegunlicense(playerid,params[])
{
if(IsACop(playerid))
{
if(OnDuty[playerid] != 1)
}
SendClientMessage(playerid, COLOR_GREY, "You are not on-duty!");
return 1;
}
if(PlayerInfo[playerid] [pRank < 6)
{
SendClientMessage(playerid, COLOR_GREY, "You need to be a Sergeant I or higher!");
return 1;
}
else if(strcmp(x_nr,"GunLicense",false) == 0)
{
new string[128];
format(string, sizeof(string), "*You have given a weapons license to %s.", PlayerNameEx(giveplayerid));
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "*You have received a weapons license from %s.", PlayerNameEx(playerid));
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
PlayerInfo[giveplayerid] [pGunLic] = 1;
return 1;
}