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



onPlayerSpawn - Problem - SpikY_ - 26.09.2015

Hi, i don't know why this problem causing; look the images below first.

its like this when Player Spawn and gets into the vehicle:


i want the player and vehicle to be spawn like this:


CODES:
PHP код:
    new Float:RandomSpawns[][] =
    {
    {
2465.0735, 642.2572, 510.2229, -178.3201},
    {
2473.2390, 642.3260, 510.2229, -178.3201},
    {
2481.1179, 642.3678, 510.2229, -178.3201},
    {
2489.3904, 642.3683, 510.2229, -178.3201},
    {
2497.3645, 642.5823, 510.2229, -178.3201}
    }; 
its under OnPlayerSpawn
PHP код:
                    new Random = random(sizeof(RandomSpawns));
                    new 
nrg = CreateVehicle(522,RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2],0,-1,-1,-1);
                    
SetVehicleZAngle(nrg,RandomSpawns[Random][3]);
                    
PutPlayerInVehicle(playerid, nrg, 0); 



Re: onPlayerSpawn - Problem - Sellize - 26.09.2015

Try putting the player in the vehicle before adjust the Z angle.


Re: onPlayerSpawn - Problem - SpikY_ - 26.09.2015

fixed! thanks