SA-MP Forums Archive
Rotation doesn't load correctly inside SetSpawnInfo - 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: Rotation doesn't load correctly inside SetSpawnInfo (/showthread.php?tid=616696)



Rotation doesn't load correctly inside SetSpawnInfo - justjamie - 09.09.2016

title
code:
PHP код:
else if(Player[playerid][Faction])
{
    
SendClientMessage(playerid,-1,sprintf("%f",Faction1337[Player[playerid][Faction]][fRot]));
    
SetSpawnInfo(playerid,0,Player[playerid][Skin], Faction1337[Player[playerid][Faction]][fSpawnX], Faction1337[Player[playerid][Faction]][fSpawnY],Faction1337[Player[playerid][Faction]][fSpawnZ],Faction1337[Player[playerid][Faction]][fRot],000000);
    
SetPlayerPos(playerid,Faction1337[Player[playerid][Faction]][fSpawnX],Faction1337[Player[playerid][Faction]][fSpawnY],Faction1337[Player[playerid][Faction]][fSpawnZ]);
    
SetPlayerInterior(playerid,Faction1337[Player[playerid][Faction]][fINT]);
    
SetPlayerVirtualWorld(playerid,Faction1337[Player[playerid][Faction]][fVW]);




Re: Rotation doesn't load correctly inside SetSpawnInfo - saffierr - 09.09.2016

Show us where you assign 'Faction1337[Player[playerid][Faction][fRot]' a value.
Perhaps you haven't assigned a value to it.


Re: Rotation doesn't load correctly inside SetSpawnInfo - justjamie - 09.09.2016

Quote:
Originally Posted by saffierr
Посмотреть сообщение
Show us where you assign 'Faction1337[Player[playerid][Faction][fRot]' a value.
Perhaps you haven't assigned a value to it.
PHP код:
SendClientMessage(playerid,-1,sprintf("%f",Faction1337[Player[playerid][Faction]][fRot])); 
i added this so you can see it loads correctly.


Re: Rotation doesn't load correctly inside SetSpawnInfo - saffierr - 09.09.2016

Quote:
Originally Posted by justjamie
Посмотреть сообщение
PHP код:
SendClientMessage(playerid,-1,sprintf("%f",Faction1337[Player[playerid][Faction]][fRot])); 
i added this so you can see it loads correctly.
I don't seem to comprehend what you are trying to say here.


Re: Rotation doesn't load correctly inside SetSpawnInfo - justjamie - 09.09.2016

Quote:
Originally Posted by saffierr
Посмотреть сообщение
I don't seem to comprehend what you are trying to say here.
then maybe you should read it again


Re: Rotation doesn't load correctly inside SetSpawnInfo - Micko123 - 09.09.2016

What is problem with code anyway?


Re: Rotation doesn't load correctly inside SetSpawnInfo - justjamie - 09.09.2016

Quote:
Originally Posted by Micko123
Посмотреть сообщение
What is problem with code anyway?
i have no idea.
but when i spawn, i spawn at rotation 0


Re: Rotation doesn't load correctly inside SetSpawnInfo - Micko123 - 09.09.2016

so? What is happening in game then??


Re: Rotation doesn't load correctly inside SetSpawnInfo - justjamie - 09.09.2016

Quote:
Originally Posted by Micko123
Посмотреть сообщение
so? What is happening in game then??
it has to put me in rotation 170, instead its putting me in rotation 0.


Re: Rotation doesn't load correctly inside SetSpawnInfo - Micko123 - 09.09.2016

I found this on wiki.
PHP код:
SetSpawnInfo(playeridteamskinFloat:xFloat:yFloat:zFloat:Angleweapon1weapon1_ammoweapon2weapon2_ammoweapon3weapon3_ammo
I don't see rotation there.