#1

Hi!!
How to make command to do with a number like "2"
Exemple to turn on the engine with "2" ??
Reply
#2

You can use OnPlayerKeyStateChange for a list of Keys view This.
Reply
#3

Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{

 if(newkeys == KEY_FIRE) //Starting vehicle engine
 {
     if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
     {

		new engine,lights,alarm,doors,bonnet,boot,objective;
		new vid = GetPlayerVehicleID(playerid);
		GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
		SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
     }
     return 1;
 }

return 1;
}
You can replace the keys from https://sampwiki.blast.hk/wiki/GetPlayerKeys
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)