Small script problem
#5

try this

PHP код:
CMD:vfixveh(playeridparams[])
{
    new 
vip[MAX_PLAYER_NAME], string[128], Float:health;
    new 
FVTime tickcount() - 180000;
    
FixvehTimer[playerid] = GetTickCount();
    
TimerInfo[playerid][CMD_vfixveh] = tickcount();
    if(
Player[playerid][pVip] < 2) return SCM(pidADMIN_COLORADMIN_MESSAGE);
    new 
vehicleid GetPlayerVehicleID(playerid);
    new 
vehicleHp GetVehicleHealth(playeridhealth);
    
GetPlayerName(playeridvipsizeof(vip));
    if(
vehicleHp == 1000) return SCM(pidADMIN_COLOR" Your vehicle is already at full hp!");
    if(!
IsPlayerInAnyVehicle(playerid))
    {
        
SCM(pidADMIN_COLOR" You are not in any vehicle.");
        
FVTime tickcount() - 180000;
        return 
1;
    }
    else if( 
GetTickCount() - FixvehTimer[playerid] < 180000 )
    {
        
RepairVehicle(vehicleid);
        
SCM(pid, -1" {74FF5C}You have fixed your vehicle! You'll be able to use this command again after 3 minutes.");
        
format(stringsizeof(string), "{EB4255}[VIP CMD] VIP Player %s has repaired his vehicle."vip);
        
SendManagerMessage(-1string);
        
SetTimerEx("EndFixvehTimer"180000false"i"playerid);
        return 
1;
    }
    else
    {
        if(
FVTime TimerInfo[playerid][CMD_vfixveh])
        {
            
SCM(pid, -1"{F71B9C} You can only use this command every 3 minutes.");
            return 
1;
        }
    }
    return 
1;

Reply


Messages In This Thread
Small script problem - by JXF - 24.06.2016, 20:11
Re: Small script problem - by F1N4L - 24.06.2016, 20:22
Re: Small script problem - by jlalt - 24.06.2016, 20:31
Re: Small script problem - by JXF - 24.06.2016, 20:48
Re: Small script problem - by IceBilizard - 25.06.2016, 04:15
Re: Small script problem - by JXF - 25.06.2016, 10:57
Re: Small script problem - by Sjn - 25.06.2016, 11:36
Re: Small script problem - by Sew_Sumi - 25.06.2016, 12:15
Re: Small script problem - by JXF - 28.06.2016, 16:34

Forum Jump:


Users browsing this thread: 2 Guest(s)