Jump to content
  • 0

Comanda /rac


Dekker

Question

Cum pot face ca la comanda /rac , masinile care sunt tunate si apoi respawnate , sa le ramana tunningul dupa respawn.

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

    {

        if(IsPlayerConnected(playerid))

        {

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

            {

                SendClientMessage(playerid, COLOR_GRAD1, "DENIED: You are not authorized to use that command!");

                return 1;

            }

            new unwanted[MAX_VEHICLES];

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

    {

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

    }

            for(new c=0;c<catevehicule ai pe sv+1;c++)

            {

                if(unwanted[c] != 1)

                {

SetVehicleToRespawn©;

}

            }

            for(new c=catevehicule ai pe sv+1;c<MAX_VEHICLES;c++)

            {

                if(unwanted[c] != 1)

                {

SetVehiclePos(c, CarInfo[c][Locationx], CarInfo[c][Locationy], CarInfo[c][Locationz]);

}

            }

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

format(string, sizeof(string), "* All unsed cars has been respawned by admin : %s", sendername);

SendClientMessageToAll(COLOR_RED, string);

        }

        return 1;

    }[/pawn]

[email protected] - Orice mapa doriti , add me !

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Incearca cu asta

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

{

    if(IsPlayerConnected(playerid))

    {

        if(PlayerInfo[playerid][pAdmin] < 2)

{

    SendClientMessage(playerid, 0x639EC5FF, "You are not authorized to use this command.");

    return 1;

}

          //  SetTimer("RACtime", 30000, 0);

              SetTimer("RACtime", 30000, 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), "{FFFFFF}[{FF6600}RAC{FFFFFF}]: All unused cars well be respawned in {009999}10 {FFFFFF}seconds by {00B366}%s",sendername);

SendClientMessageToAll(COLOR_RED,string);

}

return 1;

}[/pawn]

RPG.VIBEPLAY.RO

Recomand acest server Romanesc bY woozie aka. weedluver aka. undertaker !!

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.