Question Of Need
#1

I was wondering how i can bind a key in script that like fixes your car. Like I have a stunt server so i need help on binding a key that fixes your car
Reply
#2

To do a keybinding autorepair, you must use the OnPlayerKeyState change callback. If you don't know how to add it there, the tutorial here will explain how the callback works. https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange
Reply
#3

Thanks for the help.
Reply
#4

ok here is an example :

Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
  if((newkeys & KEY_FIRE))
  {
  RepairVehicle(GetPlayerVehicleID(playerid));
  return 1;
  }
  return 1;
}
that will make u when u press ((left mouse button)) ur car get fixed
________
Jailbroken
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)