Simple NITRO LMB
#1

When pressed LMB the nitro starts and automatically removes the nitro after 7 second. will not affect other script and other keys.
Reply
#2

Erm.. Search?
Reply
#3

pawn Код:
//Define this first
#define PRESSED(%0) \
    (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))

//Under OnPlayerKeyStateChange
if (PRESSED( KEY_FIRE ))
{
     AddVehicleComponent(GetPlayerVehicleID(playerid),1010);
}
Reply
#4

Quote:
Originally Posted by newbienoob
Посмотреть сообщение
pawn Код:
//Define this first
#define PRESSED(%0) \
    (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))

//Under OnPlayerKeyStateChange
if (PRESSED( KEY_FIRE ))
{
     AddVehicleComponent(GetPlayerVehicleID(playerid),1010);
}
thanks but where i will add that here?

Quote:

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (newkeys & KEY_HORN)
{
if(IsPlayerInAnyVehicle(playerid))
{
new VehicleID,Float:B;
VehicleID = GetPlayerVehicleID(playerid);
GetVehicleZAngle(VehicleID,B);
SetVehicleZAngle(VehicleID,B);
}
}
return 1;
}

Reply
#5

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (newkeys & KEY_HORN)
{
      if(IsPlayerInAnyVehicle(playerid))
      {
             new VehicleID,Float:B;
             VehicleID = GetPlayerVehicleID(playerid);
             GetVehicleZAngle(VehicleID,B);
             SetVehicleZAngle(VehicleID,B);
      }
      return 1;
}
if(PRESSED(KEY_FIRE)) /////Here
{
//....
return 1;
}
Reply
#6

Quote:
Originally Posted by newbienoob
Посмотреть сообщение
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (newkeys & KEY_HORN)
{
      if(IsPlayerInAnyVehicle(playerid))
      {
             new VehicleID,Float:B;
             VehicleID = GetPlayerVehicleID(playerid);
             GetVehicleZAngle(VehicleID,B);
             SetVehicleZAngle(VehicleID,B);
      }
      return 1;
}
if(PRESSED(KEY_FIRE)) /////Here
{
//....
return 1;
}
(805 : error 010: invalid function or declaration
(8062) : error 010: invalid function or declaration

if (PRESSED( KEY_FIRE ))
return 1;
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)