Results 1 to 1 of 1

Thread: Organizacija Scripting

  1. #1
    Retired ::ZeN::'s Avatar
    Join Date
    May 2011
    Location
    Београд
    Posts
    3,829
    Karma
    78

    Organizacija Scripting

    Organizacije ili bande ... koristene su da neka cjelokupna organizacija moze imati /family tj. /radio chat , rankove i svoja vlastita vozila(moze i nemora) ... Moze se koristit na mnoge nacine itd.

    Tutorial
    1.
    Spawn mjesto
    Nadite u GF GMu public SetPlayerSpawn(playerid) i ispod if(IsPlayerConnected(playerid))(ispod "{") napisite:

    Code:
    if (PlayerInfo[playerid][pMember] == broj_org || PlayerInfo[playerid][pLeader] == broj_org) // broj organizacije.. u GF default zadnja je 11(licenseri) znaci da bi tada isao kod "broj_org" 12
    {
        SetPlayerToTeamColor(playerid);
        SetPlayerInterior(playerid, 0); // ako se spawnaju u interioru promjenit iz 0 u broj_interior-a
        SetPlayerPos(playerid, xPozicija,yPozicija,zPozicija); 
        PlayerInfo[playerid][pInt] = 0; // ako se spawnaju u interioru promjenit iz 0 u kao kod "SetPlayerInterior"
        return 1; 
    }

    2.
    Izbor leader skina na F4
    Nadite u GF GM public OnPlayerRequestClass(playerid, classid) , zatim ispodovako je u default-nom GF GMu)

    Code:
    else if (classid == 11)
    {
        format(string, sizeof(string), "~y~> ~p~License Faction Leader ~y~< ~n~Leaders only!");
        GameTextForPlayer(playerid,string,3500,6);
    }
    stavite

    Code:
    else if(classid == 12)
    {
        format(string, sizeof(string), "~y~> ~p~SampScripting.tk Leader ~y~< ~n~Posjetite i psbalkan.co.nr !"); // promjenite text na sto hocete
        GameTextForPlayer(playerid,string,3500,6);
    }
    (ako radite sa default-nim GF GM ,ako ne onda stavite za jedan veci broj od posljedne organizacije)
    zatim nadite ovo:

    Code:
    new Peds[217][1] = {
    {264},
    {288},// PD organizacija
    {286},{287},{228},{113},{120},{147},{294},{227},{61},{171}, // 286 = FBI, 287 = ARMY, 228 = Bolnica itd.
    3.
    Show Stats
    Udite u GF GM i nadite public ShowStats(playerid,targetid) zatim ispod:

    Code:
    else if(PlayerInfo[targetid][pMember] == 11 || PlayerInfo[targetid][pLeader] == 11) { ttext = "School Instructor"; }
    Zatim u ShowStats publicu nadite sljedece(za rankove je to):

    Code:
    else if(IsAnInstructor(targetid))//Driving/Flying School Ranks
    {
        if(PlayerInfo[targetid][pRank] == 1) { rtext = "Trainee"; }
        else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Instructor"; }
        else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Senior Instructor"; }
        else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Manager"; }
        else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Under Boss"; }
        else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Boss"; }
        else { rtext = "Trainee"; }
    }
    i napisite ispod toga:

    Code:
    else if(PlayerInfo[playerid][pMember] == broj_org || PlayerInfo[playerid][pLeader] == broj_org)
    {
        if(PlayerInfo[targetid][pRank] == 1) { rtext = "ngsamp.co.cc"; } // prvi rank
        else if(PlayerInfo[targetid][pRank] == 2) { rtext = "[email protected]"; } // drugi rank
        else if(PlayerInfo[targetid][pRank] == 3) { rtext = "[email protected]"; } // treci rank
        else if(PlayerInfo[targetid][pRank] == 4) { rtext = "geforce-samp.com"; } // cetvrti rank
        else if(PlayerInfo[targetid][pRank] == 5) { rtext = "psbalkan.co.nr"; } // peti rank
        else if(PlayerInfo[targetid][pRank] == 6) { rtext = "sampscripting.tk"; } // sesti rank
        else { rtext = "John Rotten"; } // ako nije nista od toga
    }
    4.
    /invite
    Otidite u GF GM i nadite komandu /invite... Ispod:

    Code:
    else if(PlayerInfo[playerid][pLeader] == 11) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "School Instructor"; ChosenSkin[para1] = 255; SetPlayerSkin(para1, 255); }
    5.
    /makeleader
    Otidite u GF GM i nadite komandu /makeleader zatim ispod

    Code:
    else if(level == 11) { PlayerInfo[para1][pChar] = 171; } //Driving/Flying School
    6.
    "next" / odabir skinova
    Otidite u GF GM i nadite strcmp("next", zatim ispod

    Code:
    case 11: //Driving/Flying School
    {
         if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 59); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 59; }
         else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 60); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 60; }
         else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 76); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 76; }
         else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 150); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 150; }
    }
    (default GF GM mod)
    napisite

    Code:
    case broj_org: // sampscripting.tk
    {
         if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, id_skina_1); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = id_skina_1; } // 1. po redu skin
         else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, id_skina_2); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = id_skina_2; } // 2. po redu skin
         else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, id_skina_3); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = id_skina_3; } // 3. po redu skin 
         else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, id_skina_4); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = id_skina_4; } // 4. po redu skin
    }
    Ovdje mjenjate id skina i koliko ih ima , ako hocete jos jednog napisite iza 4. po redu:

    Code:
     else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, id_skina_5); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = id_skina_5; } // 5. po redu skin
    Last edited by ::ZeN::; 05.04.13 at 22:48. Reason: Update baze
    Nemanja Velickovic

    EX CyberShark.RS Administrator
    Studentski predstavnik u Studentskom parlamentu Ekonomskog fakulteta, Univerziteta u Beogradu
    Clan organizacije ''Grupa za SPEKOF''
    Clan ''Saveza studenata Beograda''
    Trenutno se bavim web designom i social-media marketingom.
    Za vise informacija na [email protected]

Similar Threads

  1. Organizacija
    By imported_Alka in forum Predlozi, kritike i sugestije
    Replies: 12
    Last Post: 18.11.13, 22:56
  2. DOTA ORGANIZACIJA!
    By cwele=D! in forum Dota 2
    Replies: 13
    Last Post: 25.08.13, 22:03
  3. .Lua scripting
    By Slash in forum Web Development ~ Programiranje
    Replies: 1
    Last Post: 24.02.13, 13:48
  4. ajmo ljudi organizacija ..
    By psy4zon1c in forum Pomoć HELP
    Replies: 0
    Last Post: 14.02.12, 10:21

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •