25.02.2014, 17:25
Hey how to i fix this problem. I wanna make so player have to write /onduty before they can use /lspdlocker
pawn Код:
CMD:lspdlocker(playerid, params[])
{
if(PInfo[playerid][pCop] >= 2)
if(PInfo[playerid][OnDuty] == 1) // your variable for logged players if(PInfo[playerid][Logged] == 1)
{
SendClientMessage(playerid,COLOR_GREY," You are not an OnDuty Officer, %s %s",copLevel(playerid),PlayerName(playerid));
return 0;
}
if(IsPlayerInRangeOfPoint(playerid, 3.0, 254.0871,73.6980,1003.6406,181.3983))
ShowPlayerDialog(playerid,1212,DIALOG_STYLE_LIST,"LSPD LOCKER","Weapons\nSkins\nArmour/Pills", "OK","CANCEL");
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;
}