Balkan SA:MP

San Andreas Multiplayer - www.sa-mp.com => Tutorijali u vezi SA-MPa => Temu započeo: Newest Ralph. poslato Jun 04, 2013, 19:44:36 POSLE PODNE

Naslov: [TUT]Admin na dužnosti - 3D text label
Poruka od: Newest Ralph. poslato Jun 04, 2013, 19:44:36 POSLE PODNE
Pozdrav,u ovom tutorijalu cu vam pokazat kako napravit admin duznost system..
Udite u PAWNO vaÅ¡ mod i  dodajte  na vrhu
new aDuty[MAX_PLAYERS] = 0;public OnPlayerConnect(playerid)
adminduznost[playerid] = 0;
i u OnPlayerDissconect tako.
Pa ćemo početi praviti komandu.
CMD:aduty(playerid)
{
    if(PlayerInfo[playerid][pAdmin] >=1)
    {
        if (aDuty[playerid] == 0) //Za duznost nline
        {
            new string[128];
            new Float:x,Float:y,Float:z;
            new Text3D:label = Create3DTextLabel("(Admin na duznosti) Ne Ometaj!", -1,x,y,z, 40.0, 0, 0);
            GetPlayerPos(playerid,x,y,z); // traži lokaciju afdm
            SetPlayerHealth(playerid,999999); // god mod
            SetPlayerColor(playerid,-1); // postavlja boju
            SetPlayerSkin(playerid,1); // postavlja skini
            format(string,sizeof(string), "Server | Admin %s je na duznosti.",imeadmina);
            SendClientMessageToAll(-1,string); //
     
            Attach3DTextLabelToPlayer(label,playerid,0.0, 0.0, 0.7);
            aDuty[playerid] = 1; //
        }
        else if (aDuty[playerid] == 1) // ako je na duznosti.
        {
            new string[128];
            new Float:x,Float:y,Float:z;
            new Text3D:label = Create3DTextLabel("(Admin na dužnosti) Ne Ometaj!"-1,x,y,z, 40.0, 0, 0);
            Delete3DTextLabel(label);
            SetPlayerHealth(playerid,150); // potavlja helt
          GivePlayerWeapon(playerid,26,99999); // DAJE ORUZJE
       GivePlayerWeapon(playerid,24,9999); // daje oruzje
      // dodajte vi seb jos oruzja korieteci funkciju giveplayerweapon
         
            format(string,sizeof(string),"Server | ~ Admin %s nije vise na duznosti!",imeadmina);
            SendClientMessageToAll(-1,string);
            SendClientMessage(playerid, -1,"Vi niste na duznost vise.");
            adminduznost[playerid] = 0; // postavlja admin duznost off
        }
    }
    else
        SendClientMessage(playerid,-1,"Server | ~ Nisi admin ~!"); // Nije Admin
    return 1;
}

I Naravno dodajte na kraj skripte
stock imeadmina
{
    new Name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
    return Name;
}
Naslov: Odg: [TUT]Admin na dužnosti - 3D text label
Poruka od: Riv3R4 poslato Jun 04, 2013, 19:48:38 POSLE PODNE
ima dosta ne definisanih stvari ...
Naslov: Odg: [TUT]Admin na dužnosti - 3D text label
Poruka od: Newest Ralph. poslato Jun 04, 2013, 19:58:53 POSLE PODNE
Citat: [Cyber]Master.amx poslato Jun 04, 2013, 19:48:38 POSLE PODNE
ima dosta ne definisanih stvari ...
Sada nema ako ima reci koje?
Naslov: Odg: [TUT]Admin na dužnosti - 3D text label
Poruka od: Shark_ poslato Jun 04, 2013, 21:35:16 POSLE PODNE
probacu ovo ! :D
Naslov: Odg: [TUT]Admin na dužnosti - 3D text label
Poruka od: Bugi poslato Jun 04, 2013, 21:37:26 POSLE PODNE
Lepse izgleda kad se doda ono iznad glave [ADMIN] i [VLASNIK] i to al dobro posluzice pocetnicima(  :-[ )
Naslov: Odg: [TUT]Admin na dužnosti - 3D text label
Poruka od: ado97 poslato Jun 04, 2013, 21:51:19 POSLE PODNE
Dobar tutorijal , poslužit će.
Naslov: Odg: [TUT]Admin na dužnosti - 3D text label
Poruka od: Newest Ralph. poslato Jun 05, 2013, 00:51:57 PRE PODNE
Hvala