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



Vehicle ZAngle - gedux123775 - 01.07.2011

Hi Sa-Mp support people, please help y with this script because he is buged.

This cmd turns once.
pawn Код:
if (strcmp("/cmd", cmdtext, true, 10) == 0)
    {
turgausmasina[playerid] = CreateVehicle(411,-1946.7443,264.5959,35.5924,50.0,1,1,300000);
SetVehicleVirtualWorld(turgausmasina[playerid], playerid);
SetPlayerVirtualWorld(playerid, playerid);
//PutPlayerInVehicle(playerid, turgausmasina[playerid], 0);
SetPVarInt(playerid, "turguje",1);
SetPlayerCameraLookAt(playerid, -1954.6217,264.5380,35.4688);
SetPlayerPos(playerid, -1954.6217,264.5380,35.4688);
SetPlayerCameraPos(playerid, -1954.6217,264.5380,35.4688);
SetTimerEx("Sukasi",300,true,"i",playerid);
        return 1;
    }
pawn Код:
forward Sukasi(playerid);
public Sukasi(playerid)
{
        new Float:anglee[MAX_PLAYERS];
        GetVehicleZAngle(turgausmasina[playerid], anglee[playerid]);
        SetVehicleZAngle(turgausmasina[playerid], anglee[playerid]+1);
        new string[15];
        format(string, sizeof(string), "%d", turgausmasina[playerid]);
        SendClientMessage(playerid,COLOR_WHITE,string);
}
But if I put in CMD PutPlayerInVehicle(playerid, turgausmasina[playerid], 0); turns but is fix.
but I need to work with simple without PutPlayerInVehicle(playerid, turgausmasina[playerid], 0);
Help



Re: Vehicle ZAngle - CaHbKo - 01.07.2011

1. What is it supposed to do?
2. 'anglee' is a local variable. It is 50.0 each time the function runs.


Re: Vehicle ZAngle - gedux123775 - 01.07.2011

pawn Код:
forward Sukasi(playerid);
public Sukasi(playerid)
{
        new Float:anglee[MAX_PLAYERS];
        GetVehicleZAngle(turgausmasina[playerid], anglee[playerid]);
        SetVehicleZAngle(turgausmasina[playerid], anglee[playerid]+1);
        new string[15];
        format(string, sizeof(string), "%d", turgausmasina[playerid]);
        SendClientMessage(playerid,COLOR_WHITE,string);
}
But player is in vehicle fuction is work


Re: Vehicle ZAngle - gedux123775 - 01.07.2011

Help.