[Tut]Kako napraviti org./bandu

Započeo Vlad Buzinsky, Mart 07, 2012, 21:39:54 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

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:
Kod:

Kod:
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 ispod:(ovako je u default-nom GF GMu)

Kod:

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



stavite

Kod:

Kod:
else if(classid == 12)
{
format(string, sizeof(string), "~y~> ~p~Nova Banda~y~< ~n~Nova Banda"); // 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:

Kod:

Kod:
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.

(ovo je dio koda koji nam je potreban al ima jos produzetak)
Morate POSLIJE {171},[/b] staviti {id_lider_skina}, i povecati new Peds[217][1] na new Peds[218][1](tj. na jedan broj veci od tog prvog broja poslje Peds-a

3.
Show Stats
Udite u GF GM i nadite public ShowStats(playerid,targetid) zatim ispod:

Kod:

Kod:
else if(PlayerInfo[targetid][pMember] == 11 || PlayerInfo[targetid][pLeader] == 11) { ttext = "School Instructor"; }



napisite
Kod:

Kod:
else if(PlayerInfo[targetid][pMember] == broj_org || PlayerInfo[targetid][pLeader] == broj_org) { ttext = "Naziv organizacije- Nova Banda"; }

Zatim u ShowStats publicu nadite sljedece(za rankove je to):

Kod:

Kod:
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:

Kod:

Kod:
else if(PlayerInfo[playerid][pMember] == broj_org || PlayerInfo[playerid][pLeader] == broj_org)
{
if(PlayerInfo[targetid][pRank] == 1) { rtext = "jedan"; } // prvi rank
else if(PlayerInfo[targetid][pRank] == 2) { rtext = "dva"; } // drugi rank
else if(PlayerInfo[targetid][pRank] == 3) { rtext = "tri"; } // treci rank
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "cetiri"; } // cetvrti rank
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "pet"; } // peti rank
else if(PlayerInfo[targetid][pRank] == 6) { rtext = "sest"; } // sesti rank
else { rtext = "nula"; } // ako nije nista od toga
}



4.
/invite
Otidite u GF GM i nadite komandu /invite... Ispod:

Kod:

Kod:
else if(PlayerInfo[playerid][pLeader] == 11) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "School Instructor"; ChosenSkin[para1] = 255; SetPlayerSkin(para1, 255); }


{ Umjesto brojeva kod ChosenSkin i SetPlayerSkin bit ce JoinPed,ja cu vam pokazat kako radit bez JoinPed-a }
napisite:

Kod:

Kod:
else if(PlayerInfo[playerid][pLeader] == broj_org) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Naziv Organizacije- Nova Banda"; ChosenSkin[para1] = id_pocetnog_skina; SetPlayerSkin(para1, id_pocetnog_skina); }



5.
/makeleader
Otidite u GF GM i nadite komandu /makeleader zatim ispod

Kod:

Kod:
else if(level == 11) { PlayerInfo[para1][pChar] = 171; } //Driving/Flying School


(default GF GM)
stavite:

Kod:

Kod:
else if(level == broj_org) { PlayerInfo[para1][pChar] = id_leader_skina; } // moj tut


I napravite prepravku kod:

Kod:

Kod:
if(level > 11 || level < 0) { SendClientMessage(playerid, COLOR_GREY, " Dont go below number 0, or above number 11!"); return 1; }



Editirajte level > 11 u level > 12 ili ako imate vise org vlastitih onda u zadnji broj organizacije....

6.
"next" / odabir skinova
Otidite u GF GM i nadite strcmp("next", zatim ispod

Kod:

Kod:
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
Kod:

Kod:
case broj_org: // nova banda
{
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:

Kod:

Kod:
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, id_skina_5); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = id_skina_5; } // 5. po redu skin


{{ NAPOMENA(!!!!!): Kad dodate jos skinova , ako neki od prethodnih skinova imaju SelectCharPlace[playerid] = 1 stavite na 5(po ovom primjeru inace koji ga sljedi,,znaci ak je taj skin 5. onda stavite broj 6) a ZADNJI PO REDU stavite na SelectCharPlace[playerid] = 1; }} <~(!!!)

EDIT:

Pronadite u vasem GM "SendClientMessage(playerid, COLOR_LIGHTRED, "You are part of a Family/Force, you've been forced to the right Class + Char !");" te dodajte
Kod:

else if(PlayerInfo[playerid][pMember] == broj_nove_org) { SetSpawnInfo(playerid, team_org, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = team_org; gTeam[playerid] = team_org; PlayerInfo[playerid][pModel] = model; }


te nekoliko redova ispod dodajte:

Kod:

else if(PlayerInfo[playerid][pLeader] == broj_nove_org) { SetSpawnInfo(playerid, team_org, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = team_org; gTeam[playerid] = team_org; PlayerInfo[playerid][pModel] = model; }


Ukoliko zelite /f chat, pronadite u vasem GM /family te ispod dodajte

Kod:

else if(member==broj_nove_org)
{
if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Rank 6 %s: %s. )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Rank 5 %s: %s. )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Rank 4 %s: %s. )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Rank 3 %s: %s. )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Rank 2 %s: %s. )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Rank 1 %s: %s. )) **", sendername, result); }
else { format(string, sizeof(string), "** Rank 1 %s: %s. )) **", sendername, result); }
SendFamilyMessage(PlayerInfo[playerid][pMember], TEAM_AZTECAS_COLOR, string);
}


te ispod "else if(leader==broj_org" dodajte

Kod:

else if(leader==broj_nove_org)
{
format(string, sizeof(string), "** Rank 6 %s: %s. )) **", sendername, result);
SendFamilyMessage(PlayerInfo[playerid][pLeader], TEAM_AZTECAS_COLOR, string);
}


Ukoliko zelite /r chat, pronadite u vasem GM /radio te dodajte

Kod:

else if(PlayerInfo[playerid][pMember] == broj_nove_org || PlayerInfo[playerid][pLeader] == broj_nove_org)
{
if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Rank 6 %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Rank 5 %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Rank 4 %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Rank 3 %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Rank 2 %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Rank 1 %s: %s, over. **", sendername, result); }
else
{
format(string, sizeof(string), "** Rank 1 %s: %s, over. **", sendername, result);
}
SendRadioMessage(3, TEAM_BLUE_COLOR, string);
printf("%s", string);
return 1;
}

Ako sam gdi kaj zeznuo zurio sam se recite pa cu ispraviti.... :) :)
Real Life RolePlay

mak!


Snich




Super  ;)
Balkan Underground Ex. Head Administrator
Balkan Underground Ex. Elite Moderator


© Stefan_Misurovic, 2010. - 2014.


Fino je, :Ja napravim isti ovakav tut a vi me zakljuvate i prigovarate  :-\



A ajde reci kako se rpavi /duty za org.?? npr. ja moram napraviti za SWAT


Ne razumijem sta vam znaci "Fin tut, dobar za pocetnike"... koji pocetnik ovo skonta svaka mu cast !! Ovaj tut je po meni nista... ako hoces da napravis dobar tut, prvo napravi ti sam sistem organizacija, pa onda objasni kako i sta da urade kako bi prilagodili... Ovaj tut je nasto iz zelje za postom ili neceg slicnog tome

Quilound_Williams

ljepo objasnjenoo samo si trebao korsititi da bi bilo preglednije


Ovde nista nije objasnjeno, em ne koristis em niko od pocetnika nece ovo skontati....