Spawn a vehicle close to my player
#1

So here we go, another scripting beginner asking something easy. I've been trying to learn PAWN lately and understanding it was not so hard, since I know several other programming languages, but I'm still gonna have to adapt to the SAMP specific functions and such.

Introducing aside, my problem is as it follows:

I'm trying to create a command using zcmd to spawn a vehicle in a close range to my player. I know about the CreateVehicle command and its parameters, but I'm not sure how to get my player's position and angle. If I knew how to get those, I'd simply increase the numbers a bit and add them to the function parameter list causing the vehicle to spawn nearby.

I'm sorry if this question was asked before. I did use the search function, but I could not find something that would help me fix this issue.

P.S:
I also read about GetPlayerPos(), but I'm not sure how to use it in this case.
I just need the right information to get started in PAWN and I don't see a problem adapting myself into it. Some of the tutorials around are great and some have missing videos. I'll try to squeeze information out of those to make myself a nice scripter in PAWN.

Thanks for reading.
Reply


Messages In This Thread
Spawn a vehicle close to my player - by Dugzor - 11.09.2013, 05:18
Re: Spawn a vehicle close to my player - by [HK]Ryder[AN] - 11.09.2013, 05:31
Re: Spawn a vehicle close to my player - by Dugzor - 11.09.2013, 09:11
Re: Spawn a vehicle close to my player - by Kirollos - 11.09.2013, 11:03
Re: Spawn a vehicle close to my player - by [HK]Ryder[AN] - 11.09.2013, 13:10

Forum Jump:


Users browsing this thread: 4 Guest(s)