LSPD Locker Help!
#1

Nvm.
Reply
#2

pawn Код:
if(listitem == 0) //
{
    new str[128];
    format(str, sizeof str, "{FFFFFF}Evening Officer {00FF22}%s\n{FFFFFF}Are you clocking {00FF22}ON {FFFFFF}or {F81414}OFF{FFFFFF}?", pName(playerid));
    ShowPlayerDialog(playerid, DIALOG_DUTY+1, DIALOG_STYLE_MSGBOX, "Select one", str, "On", "Off");// Change DIALOG_DUTY to the name of your Dialog.
}
pawn Код:
if(dialogid == DIALOG_DUTY+1)
    {
        if(response)
        {
            if(GetPVarInt(playerid, #OnDuty) == 0)
            {
                format(string, sizeof(string), "Officer %s places on his uniform and is now on-duty.", pName(playerid), playerid);
                SendLocalMessage(playerid, string, 10.0, -1, C_LBLUE);
                GivePlayerWeapon(playerid, 24, 75);
                GivePlayerWeapon(playerid, 3, 1);
                GivePlayerWeapon(playerid, 41, 1);
            }
            else {
                SendClientMessage(playerid, -1, " You are already on-duty !");
            }
        }
        else {
            if(GetPVarInt(playerid, #OnDuty) == 1)
            {
                format(string, sizeof(string), "Officer %s removes his uniform and is now off-duty.", pName(playerid), playerid);
                SendLocalMessage(playerid, string, 10.0, -1, C_LBLUE);
                ResetPlayerWeapons(playerid);
            }
            else {
                SendClientMessage(playerid, -1, " You are already off-duty !");
            }
        }
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)