Jump to content
  • 0

/rac


scritian

Question

Buna ma ajutati va fac comanda /rac sa fie in 10 secunde

?

[pawn] if(strcmp(cmd, "/respawnallcars", true) == 0 || strcmp(cmd, "/rac", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

        if(PlayerInfo[playerid][pAdmin] <= 1337)

{

    SendClientMessage(playerid, COLOR_GRAD1, "Nu esti autorizat sa folosesti aceasta comanda !");

    return 1;

}

new bool:unwanted[CAR_SUMA];

for(new player=0; player<MAX_PLAYERS; player++)

    {

            if(IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }

    }

for(new car = 1; car <= 268; car++)

{

if(!unwanted[car]) SetVehicleToRespawn(car);

}

GetPlayerName(playerid, sendername, sizeof(sendername));

format(string, sizeof(string), "%s a respawnat toate masinile de pe server", sendername);

SendClientMessageToAll(COLOR_RED,string);

}

return 1;

}[/pawn]

Nimeni :(??

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

(strcmp(cmd, "/respawnallcars", true) == 0 || strcmp(cmd, "/rac", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(PlayerInfo[playerid][pAdmin] < 1337)
			{
			    SendClientMessage(playerid, 0x639EC5FF, "Nu esti autorizat sa folosesti aceasta comanda !.");
			    return 1;
			}
            SetTimer("RACtime", 10000, 0);
			/*new bool:unwanted[CAR_AMOUNT];
			for(new player=0; player<MAX_PLAYERS; player++)
     		{
            	if(IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
     		}
			for(new car = 1; car <= 500; car++)
			{
				if(!unwanted[car]) SetVehicleToRespawn(car);
			}*/
			GetPlayerName(playerid, sendername, sizeof(sendername));
			format(string, sizeof(string), "All unused cars well be respawned in {FA0021}10{F5EDEE} seconds by admin {FA0021}%s",sendername);
			SendClientMessageToAll(COLOR_WHITE,string);
		}
		return 1;

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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.