Jump to content
  • 0

Comanda /aod


ToX1c

Question

Salut cum fac si eu comanda /aod cand un admin isi da aod sa nu ii mai scada deloc armura si healul..

//----------------------------------[Admin Aod]-----------------------------------------------
    if(strcmp(cmd, "/aod", true) == 0)
    {
        if (PlayerInfo[playerid][pAdmin] >= 1)
        {
            if(AdminDuty[playerid] == 1)
            {
                       GetPlayerName(playerid, sendername, sizeof(sendername));
                       format(string, sizeof(string), "Admin %s is now off duty.", sendername,playerid);
                       SendClientMessageToAll(COLOR_LIGHTGREEN,string);
                          AdminDuty[playerid] = 0;
                       SetPlayerHealth(playerid,100);
                       SetPlayerArmour(playerid,0);
                       SetPlayerToTeamColor(playerid);
              }

            else
            {
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "Admin  %s is now on duty.",sendername,playerid);
                SendClientMessageToAll(0x1B8EE4FF,string);
                AdminDuty[playerid] = 1;
                SetPlayerHealth(playerid,99999);
				SetPlayerArmour(playerid,99999);
                for(new i = 0; i < MAX_PLAYERS; i ++)
                       {
                         if(IsPlayerConnected(i))
                        {
                        }
                       }
            }
        }
        else
        {
            SendClientMessage(playerid,COLOR_GREY,"[GameSx]: Nu faci parte din staff GameSx !");
        }
        return 1;
    }

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

Uite pasta o folosesc eu si nu imi scade nimic daca sunt On duty

//--------------------------------[Admin on duty]---------------------------------------
if(strcmp(cmd, "/aod", true) == 0)
	{
		if (PlayerInfo[playerid][pAdmin] >= 1)
		{
		    if(AdminDuty[playerid] == 1)
		    {
                       GetPlayerName(playerid, sendername, sizeof(sendername));
			           format(string, sizeof(string), "[RomeoNet] %s [ID:%d] is no longer on duty as an admin.", sendername,playerid);
                       SendClientMessageToAll(COLOR_DBLUE,string);
   				       AdminDuty[playerid] = 0;
				       SetPlayerHealth(playerid,100);
				       SetPlayerArmour(playerid,0);
				       SetPlayerToTeamColor(playerid);
			  }

		    else
		    {
                GetPlayerName(playerid, sendername, sizeof(sendername));
		    	format(string, sizeof(string), "[RomeoNet] %s [ID:%d] is now on duty as an admin.Please /w or /report if you need help.",sendername,playerid);
				SendClientMessageToAll(0xFAAFBEFF,string);
				AdminDuty[playerid] = 1;
				SetPlayerHealth(playerid,99999);
				SetPlayerArmour(playerid,99999);
				SetPlayerColor(playerid,0xFAAFBEFF);
				for(new i = 0; i < MAX_PLAYERS; i ++)
				       {
				         if(IsPlayerConnected(i))
				        {
					      SetPlayerMarkerForPlayer( i,playerid,0xFAAFBEFF );
					    }
				       }
		    }
		}
		else
		{
			SendClientMessage(playerid,COLOR_GREY,"Your not an admin !");
		}
		return 1;
	}

Samp.OnlyPro.ro - RolePlay - Join Us !

Link to comment
Share on other sites

Ca tot am aflat, o sa postez aici, daca da search sa stie si altii

la /aod ca sa nu-ti mai scada deloc viata se pune un SetTimer, si la fiecare 100 milisecunde iti da viata automat, asa am aflat, la asta lucrez si eu acum, nu stiu cum se face cu SetTimer-u. Daca stie cineva,il rog sa posteze.

Link to comment
Share on other sites

Ca tot am aflat, o sa postez aici, daca da search sa stie si altii

la /aod ca sa nu-ti mai scada deloc viata se pune un SetTimer, si la fiecare 100 milisecunde iti da viata automat, asa am aflat, la asta lucrez si eu acum, nu stiu cum se face cu SetTimer-u. Daca stie cineva,il rog sa posteze.

[pawn]

SetTimerEx( "Heal", 1000, false, "dds", playerid );

[/pawn]

asta o adaugi in /aod, apoi adaugi astea:


forward Heal( playerid );
public Heal( playerid ) {
if( AdminDuty[ playerid ] ) {
            SetPlayerHealth(playerid,99999);
    SetPlayerArmour(playerid,99999);
        return true;
}
}

Incearca asa - un-tested

Link to comment
Share on other sites

Probleme Godfather !

ToX1C ( tu daca mai faci topicuri despre GF inafara topicului adecvat ), Ch1NeZu si Razvann, daca mai incercati sa ajutati/sa postati intrebari godfather in afara topicului Probleme Godfather, va dau warn, nu e chiar prima abatere a voastra.

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.