Nos Key Problem
#1

Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if(newkeys & KEY_SUBMISSION) // if somebody presses 2
	{
		if(IsNosTimer[playerid] == true)
		{
			SendClientMessage(playerid, 0xFFFF00AA, "Please Wait Before Using NOS!");
			return 1;
		}

		if(IsMotorBike(GetVehicleModel(GetPlayerVehicleID(playerid))))
		{
			Nos = SetTimerEx("NosTimer", 15000, false, "i", playerid);
			IsNosTimer[playerid] = true;
			SendClientMessage(playerid, 0xFFFF00AA, "Vehicle Is Not Modifiable!");
			return 1;
		}

		if(!IsMotorBike(GetVehicleModel(GetPlayerVehicleID(playerid))))
		{
			Nos = SetTimerEx("NosTimer", 15000, false, "i", playerid);
    	IsNosTimer[playerid] = true;
			SetVehicleHealth(GetPlayerVehicleID(playerid), 1000); //set car health to 1000
			AddVehicleComponent(GetPlayerVehicleID(playerid), 1010); //give player 10x nos.
			PlayerPlaySound(playerid, 1133, 0, 0 ,0); // little sound
			return 1;
		}
		return 1;
	}
	return 1;
}
This code is fully functional until it reaches a bike. The result is a crash via clientside, so nobody can access it. I don't know what I'm doing wrong, I just can't make it cancel out when it's on a bike, it goes on anyways. :/

Appreciate any help given, thanks.

I haven't scripted in quite a while, so don't blame me. :P
Reply


Messages In This Thread
Nos Key Problem - by FedorMS - 17.03.2009, 20:37
Re: Nos Key Problem - by MenaceX^ - 17.03.2009, 20:46
Re: Nos Key Problem - by Weirdosport - 17.03.2009, 22:48
Re: Nos Key Problem - by FedorMS - 19.03.2009, 03:15
Re: Nos Key Problem - by [HiC]TheKiller - 19.03.2009, 05:54
Re: Nos Key Problem - by FedorMS - 19.03.2009, 07:16

Forum Jump:


Users browsing this thread: 1 Guest(s)