InRangeOfPoint Issue
#1

I've been trying to get this LEO CheckBelt system to work out, now please only fix the issue that's asked instead of other issues you may see.

Error:
error 035: argument type mismatch (argument 2)

Line:
if(!IsPlayerInRangeOfPoint(playerid, 20.0, PosX[ PID ], PosY[ PID ], PosZ[ PID ])) return SendClientMessage(playerid, "You're not near this player");


pawn Code:
CMD:checkbelt(playerid, params[])
{
    new PID, PName[MAX_PLAYERS], str[200];
    if(PlayerInfo[playerid][pFaction] == 0) return SendClientMessage(playerid, COLOR_GREY, "You're not in a LEO / Government faction.");
    if(sscanf(params,"i", playerid)) return SendClientMessage(playerid,COLOR_GREY,"USAGE: /checkbelt [ID]");
    GetPlayerName(PID, PName, sizeof(PName));
    GetPlayerPos(PID, PosX[ playerid ], PosY[ playerid ], PosZ[ playerid ] );
    if(!IsPlayerInRangeOfPoint(playerid, 20.0, PosX[ PID ], PosY[ PID ], PosZ[ PID ])) return SendClientMessage(playerid, "You're not near this player");
    if(PlayerInfo[PID][pBelt] == 0)
    {
        format(str, sizeof(str), "%s %s %s Looks into the vehicle at %s seatbelt seeing it OFF", GetFactionName(playerid), GetFactionRank(playerid),GetName(playerid), GetName(PID));
        ProxDetector(50.0, playerid, str, COLOR_PINK);
    }
    else if(PlayerInfo[PID][pBelt] == 1)
    {
        format(str, sizeof(str), "%s %s %s Looks into the vehicle at %s seatbelt seeing it ON", GetFactionName(playerid), GetFactionRank(playerid),GetName(playerid), GetName(PID));
        ProxDetector(50.0, playerid, str, COLOR_PINK);
    }
    return 1;
}
Thanks in advanced.
Reply
#2

You forgot the color.

pawn Code:
if(!IsPlayerInRangeOfPoint(playerid, 20.0, PosX[ PID ], PosY[ PID ], PosZ[ PID ])) return SendClientMessage(playerid, /*COLOR*/, "You're not near this player");
Reply
#3

Nevermind Error was i forgot the color code on the SendClientMessage,
if(!IsPlayerInRangeOfPoint(playerid, 20.0, PosX[ PID ], PosY[ PID ], PosZ[ PID ])) return SendClientMessage(playerid, COLOR_GREY "You're not near this player");
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)