Jump to content
  • 0

pomoc Stunty


PanRožokRohliik

Dotaz

1 odpověd na tuto otázku

Recommended Posts

  • 0

Mám dotaz :)..Lze nějak nastavit že po STUNTU hráč dostane peníze např: 1000$ ? Ono to už ve hře sice je ale jestli by to šlo nějak nastavit ? :/ Hledal jsem a nic :/ ?

 

Tak jsem něco sesmolil :d Nefunguje to 100%, ale můžeš si s tím pohrát.

#include <a_samp>

new Float:lastZ[MAX_PLAYERS];
new timer[MAX_PLAYERS];

forward CheckPlayersZ(playerid);

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	timer[playerid] = SetTimerEx("CheckPlayersZ", 3000, true, "i", playerid);
	return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
	KillTimer(timer[playerid]);
	return 1;
}

public CheckPlayersZ(playerid)
{
	if(IsPlayerInAnyVehicle(playerid))
	{
		new Float:X, Float:Y, Float:Z;
		if(lastZ[playerid] != 0)
		{
			GetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z);
			if(Z - lastZ[playerid] > 4.5)
			{
				new string[128];
				format(string, sizeof(string), "STUNT! LastZ: %f, Z: %f", lastZ[playerid], Z);
				SendClientMessage(playerid, 0xff0000, string);
			}
		}
		else
			GetVehiclePos(GetPlayerVehicleID(playerid), X, Y, lastZ[playerid]);
	}
}
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...