Jump to content
  • 0

Am o problema cu comanda /rac.


VenoMarius ERROR404

Question

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;
}

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

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;
}
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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