SA-MP Forums Archive
Snos not refreshing - 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: Snos not refreshing (/showthread.php?tid=494176)



Snos not refreshing - Duck4coder - 12.02.2014

Hello guys, Got a small problem with a command that I have; It works how I would like it to work so if i did /snos once it would enable and then i turn it off by repeating /snos it doesn't work e.g. turned off, but the second time i turn it back on, The snos function doesn't work, it doesn't make you go faster, it just does nothing to you.

Код:
if(IsPlayerInAnyVehicle(playerid))
{
        if(Snos[playerid] == 1)
	{
	        new Float:X,
	    	        Float:Y,
	    	        Float:Z;

                new VehID = GetPlayerVehicleID(playerid);
	        GetVehicleVelocity(VehID, X, Y, Z);
	        if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
	        {
		        if((newkeys & 4) && !(oldkeys & 4))
		        {
			        SetVehicleVelocity(VehID, X*1.5, Y*1.5, Z);
			        return 1;
		        }
                }
	}
}