Jump to content

Question

Posted

vreau sa fac la comanda /rac sa nu respawneze remorca de la joubul de trucker deoarece se respawneaza si ea chiar daca acel player cand face jobul este in vehicul.

vreau o verificare de genu if(PlayerInfo[playerid][pJob] == 2 && JobWorking[playerid] == 1) sa nu se respawneze trailer adica remorca.

Doar ca nu stiu cum sa fac sa nu mai respawneze remorca daca are jobul 2 adica cel de trucker.

Ajutati-ma va rog :((.

 

Comanda

YCMD: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 true;
}

1 answer to this question

Recommended Posts

  • 0
Posted

Salut! 👋

 

Trebuie sa faci o verificare utilizand GetVehicleModel prin care vehiculele cu ID de remorca sa nu se despawneze.

Poti vedea lista ID-urilor vehiculelor aici.

YCMD: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) && GetVehicleModel(car) != 435 && GetVehicleModel(car) != 450 && GetVehicleModel(car) != 591) SetVehicleToRespawn(car); 
		}	
	}
    	format(string, sizeof(string), "({FF0000}Admin Info{FFFFFF}) %s a respawnat toate vehiculele nefolosite.", GetName(playerid));
	SendAdminMessage(COLOR_WHITE, string, 3);
	return true;
}

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
×
×
  • 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.