02.04.2018, 12:58
PHP код:
CMD:locker(playerid, params[])
{
new string[128];
if(!IsPlayerLoggedIn(playerid))
return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(IsACop(playerid))
{
if(!IsPlayerInRangeOfPoint(playerid, 2.2,256.2174,77.3295,1004.0344))
return SendClientMessage(playerid, COLOR_GREY, "You aren't near your locker.");
if(DayNoPD == 1)
return SendClientMessage(playerid, COLOR_OOC, "You can't access your locker ((/day)).");
SSSShowDialog(playerid, 5);
}
else if(IsAGov(playerid))
{
if(!IsPlayerInRangeOfPoint(playerid, 2, 352.1964,173.3516,1025.7891))
return SendClientMessage(playerid, COLOR_GREY, "You aren't near your locker.");
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
GiveDodWeapon(playerid, 29, 999);
GiveDodWeapon(playerid, 24, 999);
GiveDodWeapon(playerid, 31, 999);
GiveDodWeapon(playerid, 34, 999);
format(string, sizeof(string), "* %s grabs a Desert Eagel ,MP5 ,M4 and Sniper from the lockers.", RPN(playerid), params);
SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
}
else if(IsAReporter(playerid))
{
if(!IsPlayerInRangeOfPoint(playerid, 2, 1203.1322,-751.8103,1073.1819))
return SendClientMessage(playerid, COLOR_GREY, "You aren't near your locker.");
SSSShowDialog(playerid, 27);
}
else if(IsMedic(playerid))
{
if(!IsPlayerInRangeOfPoint(playerid, 10, 1252.2406,321.0259,-11.7422) || !IsPlayerInRangeOfPoint(playerid, 10, -196.6472,-1741.1837,675.7687))
return SendClientMessage(playerid, COLOR_GREY, "You aren't near your locker.");
SSSShowDialog(playerid, 33);
}
else if(IsFBI(playerid))
{
if(!IsPlayerInRangeOfPoint(playerid, 3, 1564.0781,-1671.5887,1723.1050))
return SendClientMessage(playerid, COLOR_GREY, "You aren't near your locker.");
SSSShowDialog(playerid, 35);
}
else if(IsARES(playerid))
{
if(!IsPlayerInRangeOfPoint(playerid, 3, 861.6902,96.3586,1006.2343))
return SendClientMessage(playerid, COLOR_GREY, "You aren't near your locker.");
SSSShowDialog(playerid, 43);
}
else if(IsHitman(playerid))
{
if(!IsPlayerInRangeOfPoint(playerid, 3, 297.5770,-105.2555,985.5322))
return SendClientMessage(playerid, COLOR_GREY, "You aren't near your locker.");
ShowModelSelectionMenu(playerid, undercover, "Select Skin");
}
else SendClientMessage(playerid, COLOR_GREY, "You are not near a locker you can open.");
return 1;
}