make cmd satdm game mode
#1

i want to make cmd for admin/rcon to untune all cars server like this:
i have problem crash in my server , and this problem in tuning cars

help my guys !!

PHP код:
CMD:untunemycar(playeridparams[]) {
    new
        
vehicleid GetPlayerVehicleID(playerid);
        
    if(
vehicleid == 0)
        return 
SendClientMessage(playerid0"ERROR: You must own this vehicle to untune it");
        
    for(new 
014i++){
        
RemoveVehicleComponent(vehicleidGetVehicleComponentInSlot(vehicleidi));
    }
    
VehicleInfo[vehicleid][mod1] = 0;
    
VehicleInfo[vehicleid][mod2] = 0;
    
VehicleInfo[vehicleid][mod3] = 0;
    
VehicleInfo[vehicleid][mod4] = 0;
    
VehicleInfo[vehicleid][mod5] = 0;
    
VehicleInfo[vehicleid][mod6] = 0;
    
VehicleInfo[vehicleid][mod7] = 0;
    
VehicleInfo[vehicleid][mod8] = 0;
    
VehicleInfo[vehicleid][mod9] = 0;
    
VehicleInfo[vehicleid][mod10] = 0;
    
VehicleInfo[vehicleid][mod11] = 0;
    
VehicleInfo[vehicleid][mod12] = 0;
    
VehicleInfo[vehicleid][mod13] = 0;
    
VehicleInfo[vehicleid][mod14] = 0;
    
VehicleInfo[vehicleid][mod15] = 0;
    
VehicleInfo[vehicleid][mod16] = 0;
    
VehicleInfo[vehicleid][mod17] = 0;
    
VehicleInfo[vehicleid][paintjob] = -1;
    
VehicleInfo[vehicleid][color_2] = -1;
    
VehicleInfo[vehicleid][color_1] = -1;
    return 
1;

Reply
#2

a command to remove the parties tuneds from to all vehicles of the server ?

Try this, i'm not sure if it does, but it should be.

PHP код:
CMD:untuneallcars(playeridparams[])
{
    if(!
IsPlayerAdmin(playerid))
        return 
SendClientMessage(playerid, -,"You are not administrator.");

    
SendClientMessage(playerid, -1"All cars has been untuned.");

    for(new 
i!= MAX_VEHICLESi++)
    {
        for(new 
j!= 14j++)
        {
            if(
!= INVALID_VEHICLE_ID)
            {
                
RemoveVehicleComponent(iGetVehicleComponentInSlot(ij));
              
/*VehicleInfo[i][mod1] = 0;
                VehicleInfo[i][mod2] = 0;
                VehicleInfo[i][mod3] = 0;
                VehicleInfo[i][mod4] = 0;
                VehicleInfo[i][mod5] = 0;
                VehicleInfo[i][mod6] = 0;
                VehicleInfo[i][mod7] = 0;
                VehicleInfo[i][mod8] = 0;
                VehicleInfo[i][mod9] = 0;
                VehicleInfo[i][mod10] = 0;
                VehicleInfo[i][mod11] = 0;
                VehicleInfo[i][mod12] = 0;
                VehicleInfo[i][mod13] = 0;
                VehicleInfo[i][mod14] = 0;
                VehicleInfo[i][mod15] = 0;
                VehicleInfo[i][mod16] = 0;
                VehicleInfo[i][mod17] = 0;
                VehicleInfo[i][paintjob] = 0;
                VehicleInfo[i][color_2] = 0;
                VehicleInfo[i][color_1] = 0;*/
            
}
        }
    }
    return 
true;

Reply
#3

Quote:
Originally Posted by JuanStone
Посмотреть сообщение
a command to remove the parties tuneds from to all vehicles of the server ?

Try this, i'm not sure if it does, but it should be.

PHP код:
CMD:untuneallcars(playeridparams[])
{
    if(!
IsPlayerAdmin(playerid))
        return 
SendClientMessage(playerid, -,"You are not administrator.");
    
SendClientMessage(playerid, -1"All cars has been untuned.");
    for(new 
i!= MAX_VEHICLESi++)
    {
        for(new 
j!= 14j++)
        {
            if(
!= INVALID_VEHICLE_ID)
            {
                
RemoveVehicleComponent(iGetVehicleComponentInSlot(ij));
              
/*VehicleInfo[i][mod1] = 0;
                VehicleInfo[i][mod2] = 0;
                VehicleInfo[i][mod3] = 0;
                VehicleInfo[i][mod4] = 0;
                VehicleInfo[i][mod5] = 0;
                VehicleInfo[i][mod6] = 0;
                VehicleInfo[i][mod7] = 0;
                VehicleInfo[i][mod8] = 0;
                VehicleInfo[i][mod9] = 0;
                VehicleInfo[i][mod10] = 0;
                VehicleInfo[i][mod11] = 0;
                VehicleInfo[i][mod12] = 0;
                VehicleInfo[i][mod13] = 0;
                VehicleInfo[i][mod14] = 0;
                VehicleInfo[i][mod15] = 0;
                VehicleInfo[i][mod16] = 0;
                VehicleInfo[i][mod17] = 0;
                VehicleInfo[i][paintjob] = 0;
                VehicleInfo[i][color_2] = 0;
                VehicleInfo[i][color_1] = 0;*/
            
}
        }
    }
    return 
true;

not working bro !!
Reply
#4

i have problem crash in my server , and this problem in tuning cars

help my guys !!
Reply
#5

+1 REp to JuanStone (y)
Reputation: 18

i fix your code..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)