Jump to content

Recommended Posts

Posted (edited)

Salut! Folosesc gamemode-ul Burned Original si vreau sa fac verificarea aceea de la DespawnVehicle sa nu se mai despawneze masina cand esti in ea, dar nu stiu cum sa fac acea verificare. Putin ajutor va rog ?

Edited by The_RobyRo
Posted

CMD:rac(playerid, params[], help) {
    if(PlayerInfo[playerid][pAdmin] < 3) return SCM(playerid, COLOR_WHITE, AdminOnly);
     new string[180];
    for(new car = 0; car < 252; car++) {
        if(IsValidVehicle(car)) {
            if(!VehicleHaveDriver(car)) SetVehicleToRespawn(car); 
        }    
    }
    format(string, sizeof(string), "({FF0000}Admin Info{FFFFFF}) %s a respawnat toate vehiculele nefolosite!", GetName(playerid));
    SendAdminMessage(COLOR_WHITE, string, 3);
    return 1;
}

stock VehicleHaveDriver(car) {
    foreach(Player, i) {
        if(IsPlayerConnected(i) && IsPlayerInVehicle(i, car)) return 1;
    }
    return 0;
}

 

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.