Adding Unlimited Nos.
#2

Look, just remove this (you really dont need this):
Код:
else if (RELEASED(KEY_FIRE))
        {
        if(IsPlayerInAnyVehicle(playerid))
        RemoveVehicleComponent(GetPlayerVehicleID(playerid), 1010);
        }
And copy/paste the rest of code from:
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
To:
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
Should work! Here is my example:
Код:
if(PRESSED(KEY_FIRE))
	{
		for(new i = 0; i<MAX_PLAYERS; i++)
        {
                 new vehicle = GetPlayerVehicleID(i);
                 AddVehicleComponent(vehicle, 1010);
        }
	}
	return 1;
}
Reply


Messages In This Thread
Adding Unlimited Nos. - by M4z - 27.06.2011, 15:31
Re: Adding Unlimited Nos. - by fiki574 - 27.06.2011, 15:47
Re: Adding Unlimited Nos. - by Raimis_R - 27.06.2011, 15:47
Re: Adding Unlimited Nos. - by M4z - 27.06.2011, 15:48

Forum Jump:


Users browsing this thread: 1 Guest(s)