SA-MP Forums Archive
Need Help. - 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: Need Help. (/showthread.php?tid=375452)



Need Help. - JustinAn - 06.09.2012

Hey guys, I'm into a problem with this error.

Код:
argument type mismatch (argument 2)
And here's the pawn code.
pawn Код:
if(GetPlayerPos(playerid, 2315.952880, -1.618174, 26.742187)
I have tried to look it up, but I couldn't find any so I really need some help on this as soon as possible.


Re: Need Help. - Kitten - 06.09.2012

Where do those coordinates direct to (checking is a player is near that coordinates?)


Re: Need Help. - JustinAn - 06.09.2012

Quote:
Originally Posted by Kitten
Посмотреть сообщение
Where do those coordinates direct to (checking is a player is near that coordinates?)
It's checking if the player is near the coordinates.


Re: Need Help. - Kitten - 07.09.2012

GetPlayerPos won't detect that use

https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint

EX
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 5.0, 2315.952880, -1.618174, 26.742187)) // Using your coords
{
     SendClientMessage ( playerid, -1 ," Code Works " );
}



Re: Need Help. - JustinAn - 07.09.2012

Ahhh damn, I forgot about that LOL thanks alot. +REP


Re: Need Help. - Penki4a - 07.09.2012

you can do like:
pawn Код:
new Float:X Float:Y Float:Z//on top of the script
//and then
GetPlayerPos(playerid, X, Y, Z);//whereever you want to use it basically X Y and Z are the coordinates that are stored and are waiting for you to use them lol



Re: Need Help. - JustinAn - 07.09.2012

Quote:
Originally Posted by Penki4a
Посмотреть сообщение
you can do like:
pawn Код:
new Float:X Float:Y Float:Z//on top of the script
//and then
GetPlayerPos(playerid, X, Y, Z);//whereever you want to use it basically X Y and Z are the coordinates that are stored and are waiting for you to use them lol
Sorry, but I've got already a better answer then yours not to be mean.


Re: Need Help. - Kitten - 07.09.2012

Quote:
Originally Posted by Penki4a
Посмотреть сообщение
you can do like:
pawn Код:
new Float:X Float:Y Float:Z//on top of the script
//and then
GetPlayerPos(playerid, X, Y, Z);//whereever you want to use it basically X Y and Z are the coordinates that are stored and are waiting for you to use them lol
Read the topic again he's trying to check if a player is near not getting the player position.