SA-MP Forums Archive
How do I give player a car using /getcar? - 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: How do I give player a car using /getcar? (/showthread.php?tid=157981)



How do I give player a car using /getcar? - markjaysonpinoy - 08.07.2010

How do I give player a car using /getcar? I reallly neeed help.
Please help!

AND PLEASEE!!!!!!!!!!!!!!!! STOP DELETING MY TOPICS!!!


Re: How do I give player a car using /getcar? - Lorenc_ - 08.07.2010

What are you saying? "How do i give a player a car using /getcar?"
Isnt getcar for retrieving ids?
More info and ill help


Re: How do I give player a car using /getcar? - markjaysonpinoy - 08.07.2010

When they do /getcar, a car will spawn then they will be inside it, and the cost is $3000


Re: How do I give player a car using /getcar? - Lorenc_ - 08.07.2010

Here i made a function..

pawn Код:
stock CreatePlayerVehicle(playerid,vehicleid,Color1,Color2)
{
    new Float: x, Float: y, Float: z, Float: r, vehicle;
    GetPlayerPos(playerid,x,y,z);
    GetPlayerFacingAngle(playerid,r);
    vehicle = CreateVehicle(vehicleid,x,y,z,r,Color1,Color2,300);
    PutPlayerInVehicle(playerid,vehicle,0);
}
1. Make the command
2. Enter the function
3. Input your stuff u want Eg:
CreatePlayerVehicle(playerid,401,0,0)
4. Test it, and tell me if im correct.


Btw add SetPlayerMoney(playerid, -30000); on the command to to minus there money.


-Lorenc


Re: How do I give player a car using /getcar? - markjaysonpinoy - 08.07.2010

Thanks Lorenc!!