Am vazut ca multi cautati, cum sa faceti o factiune noua asa ca mam gandit sa fac un tutorial ca sa nu va mai rupeti atat capul... In tutorialul de mai jos vad ca nu pre-a ati inteles nimic asa ca sa-i dam drumu! :grin:
1.Mai intai dai search(ctrl+f) si cauti:
Code: [Select]
case 11: //Driving/Flying School
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[48][0]); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = JoinPed[48][0]; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[49][0]); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = JoinPed[49][0]; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[50][0]); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = JoinPed[50][0]; }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, JoinPed[51][0]); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = JoinPed[51][0]; }
}
O dublezi pe asta, si in loc de "//Driving/Flying School" scrii "//FactiuneMeaNoua"
Si in loc de 11 pui 12
2.Acum sa setam spawnul.
Dai search(ctrl+f) si cauta.
Code: [Select]
if (PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10) //Taxi Cab Company spawn
Pe aceasta o dublezi si in loc de "//Taxi Cab Company spawn" scrii "//FactiuneaMeaNoua".
Acum te duci pe server si alegi un loc pentru spawnul factiunii, si dai /save.
D>Jocuri>GtaSanAndreas>savedpositions.txt
Acum copiezi X,Y,Z(ce ai tu acolo)
Se poate citi dupa virgule. Exemplu: 123, - modelid
456 - X
789 - Y
123 - Z
3. Acum cautati:
Code: [Select]
else if(PlayerInfo[targetid][pMember] == 11 || PlayerInfo[targetid][pLeader] == 11) { ttext = "School Instructor"; }
Si in locul lui 11 pui 12, si in locul lui "School Instructor" pui "Membru Al Factiunii Noi"
4. Acum dai mai jos pana gasesti
Code: [Select]
else if(PlayerInfo[targetid][pMember] == 11 || PlayerInfo[targetid][pLeader] == 11)
{ ftext = "License Faction"; }
O dublezi, in loc de 11 pui 12, "License Faction" il schimbi in "Factiune Noua".
5. Acum sa punem rankurile dati mai jos pana ce gasiti:
Code: [Select]
else if(PlayerInfo[targetid][pMember] == 10 || PlayerInfo[targetid][pLeader] == 10)//SAPT Ranks
{
if(PlayerInfo[targetid][pRank] == 1) { rtext = "Trainee"; }
else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Rookie"; }
else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Cabbie"; }
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Dispatcher"; }
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Shift Supervisor"; }
else if(PlayerInfo[targetid][pRank] == 6) { rtext = "SAPT Commissioner"; }
else { rtext = "Trainee"; }
}
O dublezi si in loc de 10 pui 12 si in loc de "//SAPT Ranks" pui "//Ranks factiune noua".
6.Acum sa punem si skinul liderului.
Dai search(ctrl+f) si cauti "/makeleader".
Si vei gasi asta:
Code: [Select]
if(level > 12 || level < 0) { SendClientMessage(playerid, COLOR_GREY, " Dont go below number 0, or above number 13!"); return 1; }
Din 12, modifici in 13.
Si va arata asa:
Code: [Select]
if(level > 13 || level < 0) { SendClientMessage(playerid, COLOR_GREY, " Dont go below number 0, or above number 13!"); return 1; }
7.Acum dati mai jos pana ce gasiti:
Code: [Select]
else if(level == 11) { PlayerInfo[para1][pChar] = 171; } //Driving/Flying School
O dublati, in loc de 11 puneti 12, si in loc de "//Driving/Flying School" pui "//FactiuneNoua".
Acum iti alegi un skin si il pui in loc de 171 pui skinu dorit.
8.Acum du-te la comanda "/invite".(ctrl+f si cauta "/invite" cu ghilimele!)
Si vei gasi ceva de genu:
Code: [Select]
else if(PlayerInfo[playerid][pLeader] == 11) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "School Instructors"; ChosenSkin[para1] = 59; SetPlayerSkin(para1, 59); }
O dublezi si in loc de 11 pui 12!
9. Acum sa adaugam masinile!
La inceputul gm-ului adaugi
new oricenume1;
new oricenume2; (depinde in cate masini ai da /save, daca dai in 5 masini, scri de 5 ori new oricenume3,4,5 etc)
Te duci pe server alegi masinile si pozitia lor intri in ele si dai /save.
Dupa ce ai dat la toate /save iesi de pe server, te duci in my documents/GTA San Andreas User Files/samp/savedpositions.
Copiezi masinile de acolo si le bagi ultimile, la linia
Code: [Select]
public OnGameModeInit()
{
cu ce nume ai pus tu la new origenume1; in fata acesteia dar fara new.
Un exemplu:
Code: [Select]
oricenume1 = AddStaticVehicle(486,-711.8731,941.2867,12.5849,91.0978,1,1); //NumeFactiune
oricenume2 = AddStaticVehicle(571,-666.4409,941.3121,11.4163,275.8027,1,1); //NumeFactiune
oricenume3 = AddStaticVehicle(571,-666.1060,938.0422,11.4166,266.5053,1,1); //NumeFactiune
10. Acum sa adaugam chatul la factiune
Cautati "/f" (cu ghilimele)
Veti gasi ceva de genu
Code: [Select]
else if(member==18)
{
if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Director %s: %s. )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Co-Leader %s: %s. )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Underboss %s: %s. )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Capo %s: %s. )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Mafiosso %s: %s. )) **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** New-Bie %s: %s. )) **", sendername, result); }
else { format(string, sizeof(string), "** New-Bie %s: %s. )) **", sendername, result); }
SendFamilyMessage(PlayerInfo[playerid][pMember], TEAM_AZTECAS_COLOR, string);
}
O dublati si in loc de else if(member==18) puneti else if(member==19) (sau a cata factiune este la voi)!
11. Acum sa facem masinile factiunilor numai pentru membri acesteia.
Cautati
Code: [Select]
if(newcar == 141 || newcar == 136 || newcar == 139 || newcar == 140 || newcar == 137 || newcar == 138)
{
if(PlayerInfo[playerid][pMember] == 13||PlayerInfo[playerid][pLeader] == 13) { }
else
{
SendClientMessage(playerid,COLOR_GREY,"Nu esti membru Crips");
RemovePlayerFromVehicle(playerid);
}
}
O dublati si in loc de 141,136 etc puneti ce ati pus voi la new nume; dar fara new (ex if(newcar == nume|| newcar nume2 etc..)
Si in locul
Code: [Select]
if(PlayerInfo[playerid][pMember] == 13||PlayerInfo[playerid][pLeader] == 13)
numarului 13 puneti numarul factiuni voastre
exemplu
Code: [Select]
if(PlayerInfo[playerid][pMember] == 14||PlayerInfo[playerid][pLeader] == 14)
Si in locul ,,Nu esti membru crips'' scri Nu esti membru numefactiune
Si gata..
Daca mai gasesc imbunatatiri sau vreo idee dau edit!
Atat sper sa va mearga si voua mie mia mers! Succes!!