npc - 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: npc (
/showthread.php?tid=104701)
npc -
thuron - 25.10.2009
Is there a way, to let the npc do something when you just walk against it?
Re: npc -
Kyle - 26.10.2009
No,
Re: npc -
Tr1viUm - 26.10.2009
You can check if someone is infront of the NPC and then let the NPC do some animation I think.
Re: npc -
Karlip - 26.10.2009
Quote:
Originally Posted by [MOB
Tr1viUm ]
You can check if someone is infront of the NPC and then let the NPC do some animation I think. 
|
Check the taxi_npc FS.
Re: npc -
thuron - 26.10.2009
hmm, where should i put this in my gamemode then?
Код:
stock GetXYInfrontOfMe(Float:distance, &Float:x, &Float:y)
{
new Float:z, Float:angle;
GetMyPos(x,y,z);
GetMyFacingAngle(angle);
x += (distance * floatsin(-angle, degrees));
y += (distance * floatcos(-angle, degrees));
}
GetXYInfrontOfMe(AHEAD_OF_CAR_DISTANCE,X,Y);