Need Help.
#1

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.
Reply
#2

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

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.
Reply
#4

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 " );
}
Reply
#5

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

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
Reply
#7

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.
Reply
#8

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)