[Tutorial] ADD fire from exhaust when player use nitro!
#3

Quote:
Originally Posted by brawrr
View Post

PHP Code:
new CarFireObj[MAX_PLAYERS]; // Under the script
#define HOLDING(%0) \
    
((newkeys & (%0)) == (%0))
#define RELEASED(%0) \
    
(((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))
public 
OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
    if (
HOLDING))// if player use nitro
    
{
        if(
IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
        {
            if(
IsValidObject(CarFireObj[playerid]) == 0)// add fire from exhaust when player use nitro
            
{
                
CarFireObj[playerid] = CreateObject(186940.00.00.00.00.00.0);
                
AttachObjectToVehicle(CarFireObj[playerid], GetPlayerVehicleID(playerid), 0.0, -2.31.2180.00.00.0);
            }
        }
    }
    if (
RELEASED))// if player stop use nitro
    
{
        if(
IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
        {
            if(
IsValidObject(CarFireObj[playerid]) == 1)DestroyObject(CarFireObj[playerid]);// remove fire from exhaust when player stop use nitro
        
}
    }
    return 
1;

I cant put in in my server......
Reply


Messages In This Thread
Create fire from exhaust when player use nitro! - by brawrr - 01.04.2013, 19:44
Re: ADD fire from exhaust when player use nitro! - by davve95 - 01.04.2013, 20:53
Re: Create fire from exhaust when player use nitro! - by Luminar - 28.09.2013, 14:57

Forum Jump:


Users browsing this thread: 1 Guest(s)