[TUT]Kako dodati mafiju ili org u godfather skriptu

Započeo Fico'031, Januar 05, 2011, 23:42:21 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:


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)

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




stavite

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:

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},
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:

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

napisite

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

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:


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:

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:

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

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


(default GF GM)
stavite:

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


I napravite prepravku 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

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

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:

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

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:



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


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



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


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;
}


Moze komentar

Preuzeto sa : Balkan-Mafia.info
Poslednja Izmena: Januar 06, 2011, 23:47:20 POSLE PODNE od poisoncr0'



Sada stavi da si TuT preuzeo s Balkan-MAfia foruma i to e to..



Citat: SaVkE poslato Avgust 13, 2011, 00:25:40 PRE PODNE
au brate ovo zajebano  ???   :'(
Nije zajebano sad sam uradio jednu org..... Dobar tut ;) :)

â–º USKORO â—,,
•Reg/Log System [100%]•House System [80%]•Bizz System [50%] •Ownership system [90%] •Admin System [90%] •GM System [0%] •Stats System [100%] •Jail System [90%] •Job System [70%] •Event System [40%] •Bank System [60%] •Org/Mafije [35%] •Donator System [10%]
I najveci talenti gube se u neradu, zato nemoj traziti izgovor da ne znas nego naÄ'i resenje!



Ovaj tutorial ima neko je napravio za organizacije na GF mogao si nesto drugo uradit!
Ali u svakom slucaju dobar tut!

Napoli-Best team in the world.


Napoli-Best fans in the world.

Jako dobar tut.Sve pohvale.Ali zasto svi radite za gf mod tutove samo komplicirate i sebi pisanje a i pocetnicima jer tesko shvate.Radite normalne tutove ne samo za gf.Jos jednom pohvala.