SA-MP Forums Archive
Problem - 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: Problem (/showthread.php?tid=515060)



Problem - MEGHNI - 24.05.2014

I have a problem in a code to spawn a car and the player will go straight in, here is the code:

PHP код:
    if(strcmp(cmdtext"/car"true,4) == 0)
    {
    new 
Float:X,Float:Y,Float:Z,Float:A;
    
GetPlayerPos(playerid,X,Y,Z);
    
GetPlayerFacingAngle(playerid,A);
    
CreateVehicle(411,X,Y,Z,A,1,1,120);
    
PutPlayerInVehicle(playerid,411,0); return 1;
    }
    return 
0;

However, the player does not want to get in, I used PutPlayerInVehicle as you see, but it does not work, the car spawn close to the player. Please help me