/repair to 2 help me plzz
#1

Hi everyone,

I have one question: how can a command button on a keyboard to do (eg if you / repair and that you then instead of typing in / repair in 1 to 2 times on your keyboard to click that then your vehicle is made)

Already super thanks!
snabbo
Reply
#2

this de code:

Код:
 if (!strcmp("/repair", cmdtext))
  {
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFFFFFFFF, "Je zit niet in een voertuig!");
    RepairVehicle(GetPlayerVehicleID(playerid));
    return 1;
  }
it's a nederlands server :P
Reply
#3

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


if(newkeys & KEY_SUBMISSION)
{
if(!IsPlayerInAnyVehicle(playerid)) return 1;
else
{
RepairVehicle(GetPlayerVehicleID(playerid));
SetVehicleHealth(GetPlayerVehicleID(playerid), 1000.0);
return 1;
}
}
only repair vehicle will not set the vehicle health
Reply
#4

ty it work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)