SA-MP Forums Archive
Some fuctions - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Some fuctions (/showthread.php?tid=169867)



Some fuctions - billiout - 21.08.2010

Anyone knows if there exist this fuctions? IsPlayerInAnyCar(playerid),IsPlayerInAnyBike(playe rid),IsPlayerNearNPC(playerid,npcid)


Re: Some fuctions - Hiddos - 21.08.2010

You could try this: https://sampforum.blast.hk/showthread.php?tid=56426

Unsure if the links still work.


Re: Some fuctions - willsuckformoney - 21.08.2010

uh
pawn Код:
IsPlayerInAnyVehicle(playerid);

new Float:x,Float:y,Float:z;
GetPlayerPos(NPCNAMEHERE,x,y,z);
IsPlayerInRangeOfPoint(playerid,3,x,y,z);
I can get IsPlayerOnABike for you maybe


Re: Some fuctions - billiout - 21.08.2010

Thanks Hiddos for include is that what i need and willsuckformoney for the code for the npc really nice.


Re: Some fuctions - willsuckformoney - 21.08.2010

yeah i think Jeffry showed that to me like 2 months ago


Re: Some fuctions - billiout - 21.08.2010

willsuckformoney if i put the code like this format i have this error

Код:
new Float:x,Float:y,Float:z;
GetPlayerPos(NPCNAMEHERE,x,y,z);
IsPlayerInRangeOfPoint(playerid,3,x,y,z);
error 017: undefined symbol "NPCNAMEHERE"

and if i put like this

Код:
new Float:x,Float:y,Float:z;
GetPlayerPos("NPCNAMEHERE",x,y,z);
IsPlayerInRangeOfPoint(playerid,3,x,y,z);
i have this error

error 035: argument type mismatch (argument 1).


Re: Some fuctions - Hiddos - 21.08.2010

You'll probably need the ID of the NPC and enter it instead of that string.