25.02.2014, 18:04
pawn Код:
CMD:lspdlocker(playerid, params[])
{
new str[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
if(IsPlayerInRangeOfPoint(playerid, 3.0, 254.0871,73.6980,1003.6406))
{
if(PInfo[playerid][pCop] >= 2 && PInfo[playerid][OnDuty] == 1)
{
ShowPlayerDialog(playerid,1212,DIALOG_STYLE_LIST,"LSPD LOCKER","Weapons\nSkins\nArmour\nPills", "OK","CANCEL");
format(str, sizeof(str), "You are on duty as %s - %s.", copLevel(playerid), name));
SendClientMessage(playerid,COLOR_GREY,str);
}
}
else
{
format(str, sizeof(str), "You are on duty as %s - %s.", copLevel(playerid), name));
SendClientMessage(playerid,COLOR_GREY,str);
return 1;
}
return 1;
}
CMD:onduty(playerid, params[])
{
if(PInfo[playerid][pCop] >= 2)
{
SendClientMessage(playerid, COLOR_GREEN, "fuck siv");
PInfo[playerid][OnDuty] = 1;
}
else //if he has not got the permissions
{
SendClientMessage(playerid, COLOR_RED, "OMG are you stupid fuck siv"); //return this message
return 1;
}
return 1;
}