Help me anti player offduty take gun on locker
#1

Hi, i need help with my script, im making the locker can't use with player offduty, but they not working :< Anyone can help me ?

Quote:

CMD:locker(playerid, params[])
{
if(PlayerInfo[playerid][pDuty] == 0)
SendClientMessageEx(playerid, COLOR_WHITE, " you need on Duty for do that!");
{
if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pDuty] == 1)
{
if(IsPlayerInRangeOfPoint(playerid, 4.0, 293.5988, 188.5015, 1007.1719+0.6) || IsPlayerInRangeOfPoint(playerid, 3.0, 321.43, 303.96, 999.14) && PlayerInfo[playerid][pVW] == 2112 || IsPlayerInRangeOfPoint(playerid, 5.0, -2043.527832, -189.208435, 985.183105) || IsPlayerInRangeOfPoint(playerid,3,264.29, 109.84, 1004.62) && PlayerInfo[playerid][pVW] == 1818 || IsPlayerInRangeOfPoint(playerid, 4, -1625.9365,719.1707,19995.8594) || IsPlayerInRangeOfPoint(playerid, 5.0, 1112.7, -2055.8, 1409.7))
{
ShowPlayerDialog(playerid, DIALOG_SFPD, DIALOG_STYLE_LIST, "SFPD: Lockers", "Toggle Duty\nEquipment\nClothing Selection\nClear Suspect", "Proceed", "Cancel");
}
else
{
SendClientMessageEx(playerid, COLOR_WHITE, "You aren't in range of your SFPD lockers.");
}
}
}
return 1;
}

Reply
#2

Will reply with fix once i edit it.

Hm, this may work. If not, respond back with the errors.


pawn Код:
CMD:locker(playerid, params[])
{
    if(PlayerInfo[playerid][pDuty] == 0) return SendClientMessageEx(playerid,COLOR_WHITE, "You can't use the locker when off duty.");
    if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pDuty] == 1)
    if(IsPlayerInRangeOfPoint(playerid, 4.0, 293.5988, 188.5015, 1007.1719+0.6) || IsPlayerInRangeOfPoint(playerid, 3.0, 321.43, 303.96, 999.14) && PlayerInfo[playerid][pVW] == 2112 || IsPlayerInRangeOfPoint(playerid, 5.0, -2043.527832, -189.208435, 985.183105) || IsPlayerInRangeOfPoint(playerid,3,264.29, 109.84, 1004.62) && PlayerInfo[playerid][pVW] == 1818 || IsPlayerInRangeOfPoint(playerid, 4, -1625.9365,719.1707,19995.8594) || IsPlayerInRangeOfPoint(playerid, 5.0, 1112.7, -2055.8, 1409.7))
    {
        ShowPlayerDialog(playerid, DIALOG_SFPD, DIALOG_STYLE_LIST, "SFPD: Lockers", "Toggle Duty\nEquipment\nClothing Selection\nClear Suspect", "Proceed", "Cancel");
    }
    else
    {
        SendClientMessageEx(playerid, COLOR_WHITE, "You aren't in range of your SFPD lockers.");
    }
    return 1;
}
Reply
#3

Quote:
Originally Posted by rangerxxll
Посмотреть сообщение
Will reply with fix once i edit it.
can you help me pls
Reply
#4

Hm, this may work. If not, respond back with the errors.


pawn Код:
CMD:locker(playerid, params[])
{
    if(PlayerInfo[playerid][pDuty] == 0) return SendClientMessageEx(playerid,COLOR_WHITE, "You can't use the locker when off duty.");
    if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pDuty] == 1)
    if(IsPlayerInRangeOfPoint(playerid, 4.0, 293.5988, 188.5015, 1007.1719+0.6) || IsPlayerInRangeOfPoint(playerid, 3.0, 321.43, 303.96, 999.14) && PlayerInfo[playerid][pVW] == 2112 || IsPlayerInRangeOfPoint(playerid, 5.0, -2043.527832, -189.208435, 985.183105) || IsPlayerInRangeOfPoint(playerid,3,264.29, 109.84, 1004.62) && PlayerInfo[playerid][pVW] == 1818 || IsPlayerInRangeOfPoint(playerid, 4, -1625.9365,719.1707,19995.8594) || IsPlayerInRangeOfPoint(playerid, 5.0, 1112.7, -2055.8, 1409.7))
    {
        ShowPlayerDialog(playerid, DIALOG_SFPD, DIALOG_STYLE_LIST, "SFPD: Lockers", "Toggle Duty\nEquipment\nClothing Selection\nClear Suspect", "Proceed", "Cancel");
    }
    else
    {
        SendClientMessageEx(playerid, COLOR_WHITE, "You aren't in range of your SFPD lockers.");
    }
    return 1;
}
Reply
#5

Quote:
Originally Posted by rangerxxll
Посмотреть сообщение
Hm, this may work. If not, respond back with the errors.


pawn Код:
CMD:locker(playerid, params[])
{
    if(PlayerInfo[playerid][pDuty] == 0) return SendClientMessageEx(playerid,COLOR_WHITE, "You can't use the locker when off duty.");
    if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pDuty] == 1)
    if(IsPlayerInRangeOfPoint(playerid, 4.0, 293.5988, 188.5015, 1007.1719+0.6) || IsPlayerInRangeOfPoint(playerid, 3.0, 321.43, 303.96, 999.14) && PlayerInfo[playerid][pVW] == 2112 || IsPlayerInRangeOfPoint(playerid, 5.0, -2043.527832, -189.208435, 985.183105) || IsPlayerInRangeOfPoint(playerid,3,264.29, 109.84, 1004.62) && PlayerInfo[playerid][pVW] == 1818 || IsPlayerInRangeOfPoint(playerid, 4, -1625.9365,719.1707,19995.8594) || IsPlayerInRangeOfPoint(playerid, 5.0, 1112.7, -2055.8, 1409.7))
    {
        ShowPlayerDialog(playerid, DIALOG_SFPD, DIALOG_STYLE_LIST, "SFPD: Lockers", "Toggle Duty\nEquipment\nClothing Selection\nClear Suspect", "Proceed", "Cancel");
    }
    else
    {
        SendClientMessageEx(playerid, COLOR_WHITE, "You aren't in range of your SFPD lockers.");
    }
    return 1;
}
thanks you im try do that now
Reply
#6

Thanks you very much rangerxxll, your script has been working ! +Rep for you :*
Reply
#7

Not a problem. Any other questions you know where to ask.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)