Cops - /givelicense Command
#2

pawn Код:
CMD:givelicense(playerid,params[])
{
    new targetid;
    if(IsACop(playerid))
    {
        if(sscanf(params,"u",targetid)) return SendClientMessage(playerid,-1,"Please enter the ID of the player who you want to issue the license to.");
        if(!IsPlayerConnected(targetid) || targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "This player is not connected!");
        if(PlayerInfo[playerid][pGunLic] == 0)//This is if they DON'T have a gun license (There is no ; here)
        {
            PlayerInfo[targetid][pGunLic] = 1;
            SendClientMessage(targetid, COLOR_ORANGE, "You have been issued a gun license! Use it carefully.");
            SendClientMessage(playerid, 0xFFFF00FF, "You have just issued a gun license to this player.");  
        }
        else if(PlayerInfo[playerid][pGunLic] == 1) return SendClientMessage(playerid, COLOR_ORANGE, "They already have a Gun License");
    }
    else return SendClientMessage(playerid, COLOR_RED," You are not a cop!");
    return 1;
}
EDIT: Thanks, benzo.
Reply


Messages In This Thread
Cops - /givelicense Command - by Jay_Dixon - 13.12.2012, 04:50
Re: Cops - /givelicense Command - by RajatPawar - 13.12.2012, 04:54
Re: Cops - /givelicense Command - by Threshold - 13.12.2012, 04:58
Re: Cops - /givelicense Command - by RajatPawar - 13.12.2012, 05:02
Re: Cops - /givelicense Command - by Mado - 13.12.2012, 05:03
Re: Cops - /givelicense Command - by Jay_Dixon - 13.12.2012, 18:18

Forum Jump:


Users browsing this thread: 4 Guest(s)