InRangeOfPoint Issue - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: InRangeOfPoint Issue (
/showthread.php?tid=528211)
InRangeOfPoint Issue -
Cole_William - 26.07.2014
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.
Re: InRangeOfPoint Issue -
Dignity - 26.07.2014
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");
Re: InRangeOfPoint Issue -
Cole_William - 26.07.2014
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");