BALKAN SAMP
Would you like to react to this message? Create an account in a few clicks or log in to continue.


Balkan samp
 
Početna stranicaLatest imagesPretraľnikRegistracijaLogin

 

 [TUT]Automobili za GF scriptu

Go down 
Autor/icaPoruka
Don_Soprano
Admin
Don_Soprano


Broj postova : 18
Join date : 20.02.2012
Age : 27

[TUT]Automobili za GF scriptu Empty
PostajNaslov: [TUT]Automobili za GF scriptu   [TUT]Automobili za GF scriptu Emptysri vel 22, 2012 3:04 pm

date=1294267341]
[color=orange][size=12pt]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:


[color=orange][size=12pt][b]
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;
}


[color=orange][size=12pt][b]2.
Izbor leader skina na F4
Nadite u GF GM public OnPlayerRequestClass(playerid, classid) , zatim ispod:(ovako je u default-nom GF GMu)

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



[color=orange][size=12pt][b]stavite

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



[color=orange][size=12pt][b](ako radite sa default-nim GF GM ,ako ne onda stavite za jedan veci broj od posljedne organizacije)
zatim nadite ovo:

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.

[color=orange][size=12pt][b](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

[color=orange][size=12pt][b]3.
Show Stats
Udite u GF GM i nadite public ShowStats(playerid,targetid) zatim ispod:

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

[color=orange][size=12pt][b]napisite

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

[color=orange][size=12pt][b]Zatim u ShowStats publicu nadite sljedece(za rankove je to):

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

[color=orange][size=12pt][b]i napisite ispod toga:


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
}


[color=orange][size=12pt][b]4.
/invite
Otidite u GF GM i nadite komandu /invite... Ispod:

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


[color=orange][size=12pt][b]{ Umjesto brojeva kod ChosenSkin i SetPlayerSkin bit ce JoinPed,ja cu vam pokazat kako radit bez JoinPed-a }
napisite:

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



[color=orange][size=12pt][b]5.
/makeleader
Otidite u GF GM i nadite komandu /makeleader zatim ispod

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


[color=orange][size=12pt][b](default GF GM)
stavite:

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


[color=orange][size=12pt][b]I napravite prepravku kod:

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



[color=orange][size=12pt][b]Editirajte level > 11 u level > 12 ili ako imate vise org vlastitih onda u zadnji broj organizacije....

[color=orange][size=12pt][b]6.
"next" / odabir skinova
Otidite u GF GM i nadite strcmp("next", zatim ispod

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

[color=orange][size=12pt][b](default GF GM mod)
napisite

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
}


[color=orange][size=12pt][b]Ovdje mjenjate id skina i koliko ih ima , ako hocete jos jednog napisite iza 4. po redu:

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


[color=orange][size=12pt][b]{{ 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; }} <~(!!!)

[color=orange][size=12pt][b]EDIT:

[color=orange][size=12pt][b]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; }


[color=orange][size=12pt][b]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; }


[color=orange][size=12pt][b]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);
}


[color=orange][size=12pt][b]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);
}


[color=orange][size=12pt][b]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;
}

[color=orange][size=12pt][b]Moze komentar

Preuzeto sa : Balkan-Mafia.info
[Vrh] Go down
http://balkan-samp.friendhood.net
 
[TUT]Automobili za GF scriptu
[Vrh] 
Stranica 1 / 1.

Permissions in this forum:Ne moľeą odgovarati na postove.
BALKAN SAMP :: San Andreas Multiplayer - www.sa-mp.com :: Tutoriali u vezi SA:MP-a-
Forum(o)Bir: