SA-MP Forums Archive
Player spawn in Vehicle - 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)
+--- Thread: Player spawn in Vehicle (/showthread.php?tid=379549)



Player spawn in Vehicle - DexXxo - 22.09.2012

Hi guys, sry for my bad English iґm German
I want to make is that if you spawn directly in the car how?
For me, if I then go into the game always comes across the screen or an error.
I have make:

new infernus;

public OnPlayerSpawn(playerid)
{
infernus = CreateVehicle(411,2022.9158,1351.4866,10.0739,269. 4792,1,2,0);
PutPlayerInVehicle(playerid,infernus,0);
return 1;
}

Please say me how i can make who player spawn in a car when he click on "Spawn".

PS: Again sry for my bad English I hope you can understand this.


Re: Player spawn in Vehicle - newbienoob - 22.09.2012

pawn Код:
public OnPlayerSpawn(playerid)
{
    new Float:Pos[4];
    GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]); //get player's pos
    GetPlayerFacingAngle(playerid,Pos[3]); //and player's facing angle
    infernus = CreateVehicle(411,Pos[0],Pos[1],Pos[2],Pos[3],1,2,0); //now create infernus at player's pos
    PutPlayerInVehicle(playerid,infernus,0); //put them in the infernus
    return 1;
}



AW: Player spawn in Vehicle - DexXxo - 22.09.2012

Itґs works but the error come again on the screen here is the error:
LOADING
STAY WITHIN THE WORLD BOUNDRIES

Why