CMD:locker(playerid, params[]) { if(PlayerInfo[playerid][pFaction] == 1 || PlayerInfo[playerid][pLeader] == 1) { if(IsPlayerInRangeOfPoint(playerid,3.5,255.385696, 77.201263, 1003.640625 || IsPlayerInRangeOfPoint(playerid,3,310.3679,-1537.5204,-45.1338 && 3.5,255.385696, 77.201263))) { ShowPlayerDialogEx(playerid, DUTYMENU, DIALOG_STYLE_LIST, "LSPD Menu","Duty\nEquipment\nTactical\nUniform\nUndercover\nClear Suspect", "Select", "Cancel"); } else { SendClientMessage(playerid, COLOR_WHITE, "You're not in range of your lockers."); } } if(PlayerInfo[playerid][pFaction] == 2 || PlayerInfo[playerid][pLeader] == 2) { if(IsPlayerInRangeOfPoint(playerid,3,310.3679,-1537.5204,-45.1338 && 3.5,255.385696, 77.201263 || IsPlayerInRangeOfPoint(playerid,3.5,255.385696, 77.201263, 1003.640625))) { ShowPlayerDialogEx(playerid, FDUTYMENU, DIALOG_STYLE_LIST, "FBI Menu","Duty\nEquipment\nSWAT Uniform\nUniform\nUndercover\nClear Suspect", "Select", "Cancel"); } else { SendClientMessage(playerid, COLOR_WHITE, "You're not in range of your lockers."); } } return 1; }
C:\Users\cyro\Desktop\rp\gamemodes\rp.pwn(24020) : warning 213: tag mismatch C:\Users\cyro\Desktop\rp\gamemodes\rp.pwn(24020) : warning 202: number of arguments does not match definition C:\Users\cyro\Desktop\rp\gamemodes\rp.pwn(24020) : warning 202: number of arguments does not match definition C:\Users\cyro\Desktop\rp\gamemodes\rp.pwn(24020) : warning 213: tag mismatch
if(IsPlayerInRangeOfPoint(playerid,3.5,255.385696, 77.201263, 1003.640625 || IsPlayerInRangeOfPoint(playerid,3,310.3679,-1537.5204,-45.1338 && 3.5,255.385696, 77.201263))) |
if( // line 5
IsPlayerInRangeOfPoint(playerid, 3.5, 255.385696, 77.201263, 1003.640625) ||
(
IsPlayerInRangeOfPoint(playerid, 3.5, 310.3679, -1537.5204, -45.1338) &&
IsPlayerInRangeOfPoint(playerid, 3.5, 310.3679, -1537.5204, -45.1338) // they're same
)
)
{
}
// But what is it ? 3.5 radius? and where is posZ?
3.5,255.385696, 77.201263
C:\Users\Cyro\Desktop\rp\gamemodes\rp.pwn(24020) : warning 213: tag mismatch C:\Users\Cyro\Desktop\rp\gamemodes\rp.pwn(24031) : warning 213: tag mismatch
CMD:locker(playerid, params[]) { if(PlayerInfo[playerid][pFaction] == 1 || PlayerInfo[playerid][pLeader] == 1) { if(IsPlayerInRangeOfPoint(playerid,3.5,255.385696, 77.201263, 1003.640625 || IsPlayerInRangeOfPoint(playerid,3,310.3679,-1537.5204,-45.1338 ))) { ShowPlayerDialogEx(playerid, DUTYMENU, DIALOG_STYLE_LIST, "LSPD Menu","Duty\nEquipment\nTactical\nUniform\nUndercover\nClear Suspect", "Select", "Cancel"); } else { SendClientMessage(playerid, COLOR_WHITE, "You're not in range of your lockers."); } } if(PlayerInfo[playerid][pFaction] == 2 || PlayerInfo[playerid][pLeader] == 2) { if(IsPlayerInRangeOfPoint(playerid,3,310.3679,-1537.5204,-45.1338 || IsPlayerInRangeOfPoint(playerid,3.5,255.385696, 77.201263, 1003.640625))) { ShowPlayerDialogEx(playerid, FDUTYMENU, DIALOG_STYLE_LIST, "FBI Menu","Duty\nEquipment\nSWAT Uniform\nUniform\nUndercover\nClear Suspect", "Select", "Cancel"); } else { SendClientMessage(playerid, COLOR_WHITE, "You're not in range of your lockers."); } } return 1; }
CMD:locker(playerid, params[])
{
if(PlayerInfo[playerid][pFaction] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
if(IsPlayerInRangeOfPoint(playerid,3.5,255.385696, 77.201263, 1003.640625 || IsPlayerInRangeOfPoint(playerid,3,310.3679,-1537.5204,-45.1338 && 3.5,255.385696, 77.201263)))
// line above just won't work, some parameters are missing and it's a misuse of the function
{
ShowPlayerDialogEx(playerid, DUTYMENU, DIALOG_STYLE_LIST, "LSPD Menu","Duty\nEquipment\nTactical\nUniform\nUndercover\nClear Suspect", "Select", "Cancel");
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "You're not in range of your lockers.");
}
}
if(PlayerInfo[playerid][pFaction] == 2 || PlayerInfo[playerid][pLeader] == 2)
{
if(IsPlayerInRangeOfPoint(playerid,3,310.3679,-1537.5204,-45.1338 && 3.5,255.385696, 77.201263 || IsPlayerInRangeOfPoint(playerid,3.5,255.385696, 77.201263, 1003.640625)))
// again, line above won't work.
{
ShowPlayerDialogEx(playerid, FDUTYMENU, DIALOG_STYLE_LIST, "FBI Menu","Duty\nEquipment\nSWAT Uniform\nUniform\nUndercover\nClear Suspect", "Select", "Cancel");
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "You're not in range of your lockers.");
}
}
return 1;
}
// when you use the if function, you can only use one native. For example:
// IsPlayerInRangeOfPoint(playerid, range, X, Y, Z) || IsPlayerInrangeOfPoint(playerid, range, X, Y, Z)
// So close the native before you want to use the "or" function or "equals" function.
// Also, the latest parameter in IsPlayerInRangeOfPoint is missing. You're missing a Z-coord.
CMD:locker(playerid, params[])
{
if(PlayerInfo[playerid][pFaction] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
if(IsPlayerInRangeOfPoint(playerid,3.5,255.385696, 77.201263, 1003.640625) || IsPlayerInRangeOfPoint(playerid,3,310.3679,-1537.5204,-45.1338) || IsPlayerInRangeOfPoint(playerid, 3.5,255.385696, 77.201263, /*Z-coord missing*/))
{
ShowPlayerDialogEx(playerid, DUTYMENU, DIALOG_STYLE_LIST, "LSPD Menu","Duty\nEquipment\nTactical\nUniform\nUndercover\nClear Suspect", "Select", "Cancel");
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "You're not in range of your lockers.");
}
}
if(PlayerInfo[playerid][pFaction] == 2 || PlayerInfo[playerid][pLeader] == 2)
{
if(IsPlayerInRangeOfPoint(playerid,3,310.3679,-1537.5204,-45.1338) || IsPlayerInRangeOfPoint(playerid,3.5,255.385696, 77.201263,/* Z-coord missing*/) || IsPlayerInRangeOfPoint(playerid,3.5,255.385696, 77.201263, 1003.640625))
{
ShowPlayerDialogEx(playerid, FDUTYMENU, DIALOG_STYLE_LIST, "FBI Menu","Duty\nEquipment\nSWAT Uniform\nUniform\nUndercover\nClear Suspect", "Select", "Cancel");
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "You're not in range of your lockers.");
}
}
return 1;
}
CMD:locker(playerid, params[])
{
if(PlayerInfo[playerid][pFaction] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
if(IsPlayerInRangeOfPoint(playerid,3.5,255.385696, 77.201263, 1003.640625 || IsPlayerInRangeOfPoint(playerid,3,310.3679,-1537.5204,-45.1338 )))
{
ShowPlayerDialogEx(playerid, DUTYMENU, DIALOG_STYLE_LIST, "LSPD Menu","Duty\nEquipment\nTactical\nUniform\nUndercover\nClear Suspect", "Select", "Cancel");
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "You're not in range of your lockers.");
}
}
if(PlayerInfo[playerid][pFaction] == 2 || PlayerInfo[playerid][pLeader] == 2)
{
if(IsPlayerInRangeOfPoint(playerid,3.5,255.385696, 77.201263, 1003.640625 || IsPlayerInRangeOfPoint(playerid,3,310.3679,-1537.5204,-45.1338 )))
{
ShowPlayerDialogEx(playerid, FDUTYMENU, DIALOG_STYLE_LIST, "FBI Menu","Duty\nEquipment\nSWAT Uniform\nUniform\nUndercover\nClear Suspect", "Select", "Cancel");
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "You're not in range of your lockers.");
}
}
return 1;
}
if(IsPlayerInRangeOfPoint(playerid,3.5, 255.385696, 77.201263, 1003.640625) || IsPlayerInRangeOfPoint(playerid,3,310.3679,-1537.5204,-45.1338 ))
{
}