Jump to content
  • 0

Ajutor /rac


MoMu

Question

Salut... cum fac sa aiba acces la rac admini de la lvl 2 in sus adica.. admin 1 , admin 2,admin 3 , admin 4...pentru ca la .ah le apare si comanda /rac dar nu o pot folosii

Fac mape personalizate dupa placul dumneavoastra.. la pret de 2 euro Orange .. contact Y'M: mihay_toha

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

Uite aici comanda /rac

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

{

    if(IsPlayerConnected(playerid))

    {

        if(PlayerInfo[playerid][pAdmin] < 1) //schimbi aici si pui adminul care vrei sa o foloseasca

{

    SendClientMessage(playerid, COLOR_GRAD1, "{30a030}[b-Strike.ro]: {ffffff}Ne pare rau, dar nu ai acces la aceasta comanda.");

    return 1;

}

new bool:unwanted[CAR_AMOUNT];

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

    {

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

    }

for(new car = 55; car <= 260; car++)

{

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

}

for(new car = 261; car <= 350; car++)

{

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

}

}

return 1;

}[/pawn]

Link to comment
Share on other sites

}
	if(strcmp(cmd, "/respawnallcars", true) == 0 || strcmp(cmd, "/rac", true) == 0) //
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pAdmin] <= 4)
            {
                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<MAX_VEHICLES;c++)
            {
                if(unwanted[c] != 1)
                {
					SetVehicleToRespawn(c);
				}
            }
            GetPlayerName(playerid, sendername, sizeof(sendername));
			format(string, sizeof(string), "* Toate masinile au fost asezate la locul lor, de admin : %s", sendername);
			SendClientMessageToAll(COLOR_LIGHTBLUE, string);
        }
        return 1;
    }

Dekker si Rock uite aici comanda /rac

Ps: Mr_laury eu vreau sa o foloseasca admin 2,3,4 cum fac

Fac mape personalizate dupa placul dumneavoastra.. la pret de 2 euro Orange .. contact Y'M: mihay_toha

Link to comment
Share on other sites

if(PlayerInfo[playerid][pAdmin] < 4) Modifica aici cu ce crad de admin sa aiba acces la aceasta comanda.

Daca pui 4 o sa aiba acces si admini cu level 1 , 2 , 3 si 4, iar daca pui if(PlayerInfo[playerid][pAdmin] < 3) o sa aiba acces admini cu level 1 , 2 ,si 3 si tot asa pana la 0, cand atunci automat o sa aiba civili acces la comanda.

LISTA - GAMEMODE-URI SA-MP - Le gasiti pe toate aici: http://twiriock.com/3MGP

Link to comment
Share on other sites

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

Doar adminii de level 1 si 2 vor putea folosii comanda pentru ca tu verifici daca este mai mic decat 3.

daca(if) PlayerInfo[etc][etc] este mai mic(<) decat 3, inseamnand 1 si 2

Tu trebuie sa pui acolo <= (Mai mic sau egal)

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.