[code]Ok am vazut ca multi cautati rob system cu van si destinatii ok va postez eu unul [u][b]nu e facut de mine[/b][/u] si nu stiu cine la facut sa ii aprob creditele...
Sa incepem
On Top:
[code]new Robbed[MAX_PLAYERS];
new RobbedTime[MAX_PLAYERS];
Cautam:
enum pInfo
si adaugam
pRobSkill,
pRob,
Cautam:
public OnPlayerConnect
si adaugam mai jos
CP[playerid] = 0; Robbed[playerid] = 0; SpawnChange[playerid] = 1;
RobbedTime[playerid] = 0; MoneyMessage[playerid] = 0; Condom[playerid] = 0;
PlayerInfo[playerid][pRobSkill] = 0;
PlayerInfo[playerid][pRob] = 0;
Cautam OnPlayerEnterCheckpoint
si adaugam mai jos
else if(CP[playerid] == 50)//Robbing1
{
if(IsPlayerInVehicle(playerid, 254))
{
WantedPoints[playerid]+=20; SetPlayerCriminal(playerid,255, "Jefuieste banca orasului");
GameTextForPlayer(playerid, "~r~Ai jefuit banca", 2500, 1);
DisablePlayerCheckpoint(playerid);
CP[playerid] = 51;
SetPlayerCheckpoint(playerid, 2379.7356, -2015.2886, 14.9519, 3.0);
SendClientMessage(playerid, COLOR_YELLOW, "Acum dute la depozit pentru a lua bani.");
BizzInfo[4][bProducts] -= 25;
new pName[24];
new str[128];
GetPlayerName(playerid, pName, 24);
format(str, 128,"Banca a fost jefuita de %s, toate unitatile in alerta !", pName);
SendClientMessageToAll(COLOR_RED, str);
}
else
{
SendClientMessage(playerid, COLOR_YELLOW, "Misiune esuata !");
DisablePlayerCheckpoint(playerid);
}
}
else if(CP[playerid] == 51)//Robbing2
{
if(IsPlayerInVehicle(playerid, 254))
{
new cashr;
new str[128];
cashr = ((PlayerInfo[playerid][pCash]/50)*PlayerInfo[playerid][pLevel]);
PlayerInfo[playerid][pRob] -= 15;
PlayerInfo[playerid][pRobSkill] += 5;
DisablePlayerCheckpoint(playerid);
GivePlayerMoney(playerid, cashr);
RemovePlayerFromVehicle(playerid);
format(str, 128,"Misiune completa ! Ai luat $%d pentru ca ai jefuit banca", cashr);
SendClientMessage(playerid, COLOR_YELLOW, str);
SetVehicleToRespawn(254);
}
else
{
SendClientMessage(playerid, COLOR_YELLOW, "Misiune esuata !");
DisablePlayerCheckpoint(playerid);
}
}
sau daca nu aveti alte checkpoint-uri
adaugam
if(CP[playerid] == 50)//Robbing1
{
if(IsPlayerInVehicle(playerid, 254))
{
WantedPoints[playerid]+=20; SetPlayerCriminal(playerid,255, "Jefuieste banca orasului");
GameTextForPlayer(playerid, "~r~Ai jefuit banca", 2500, 1);
DisablePlayerCheckpoint(playerid);
CP[playerid] = 51;
SetPlayerCheckpoint(playerid, 2379.7356, -2015.2886, 14.9519, 3.0);
SendClientMessage(playerid, COLOR_YELLOW, "Acum dute la depozit pentru a lua bani.");
BizzInfo[4][bProducts] -= 25;
new pName[24];
new str[128];
GetPlayerName(playerid, pName, 24);
format(str, 128,"Banca a fost jefuita de %s, toate unitatile in alerta !", pName);
SendClientMessageToAll(COLOR_RED, str);
}
else
{
SendClientMessage(playerid, COLOR_YELLOW, "Misiune esuata !");
DisablePlayerCheckpoint(playerid);
}
}
else if(CP[playerid] == 51)//Robbing2
{
if(IsPlayerInVehicle(playerid, 254))
{
new cashr;
new str[128];
cashr = ((PlayerInfo[playerid][pCash]/50)*PlayerInfo[playerid][pLevel]);
PlayerInfo[playerid][pRob] -= 15;
PlayerInfo[playerid][pRobSkill] += 5;
DisablePlayerCheckpoint(playerid);
GivePlayerMoney(playerid, cashr);
RemovePlayerFromVehicle(playerid);
format(str, 128,"Misiune completa ! Ai luat $%d pentru ca ai jefuit banca", cashr);
SendClientMessage(playerid, COLOR_YELLOW, str);
SetVehicleToRespawn(254);
}
else
{
SendClientMessage(playerid, COLOR_YELLOW, "Misiune esuata !");
DisablePlayerCheckpoint(playerid);
}
}
Cautam OnPlayerStateChange
si adaugam mai jos
if(newcar == 254)
{
if(PlayerInfo[playerid][pLevel] >= 5)
{
SendClientMessage(playerid, COLOR_YELLOW, "Scrie /rob pentru a jefui banca.");
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Iti trebuie level 5 pentru a conduce vanul !");
RemovePlayerFromVehicle(playerid);
}
if(IsACop(playerid))
{
SendClientMessage(playerid, COLOR_GREY, " Polotisti nu pot conduce vanul !");
RemovePlayerFromVehicle(playerid);
}
}
Cautam SetPlayerUnJail
iar mai jos adaugam
if(Robbed[i] == 1)
{
if(RobbedTime[i] <= 0)
{
RobbedTime[i] = 0;
Robbed[i] = 0;
}
else
{
RobbedTime[i] -= 1;
}
}
Cautam public ShoStats
iar mai jos adaugam
new robstat = PlayerInfo[targetid][pRob];
Cautam
format(coordsstring, sizeof(coordsstring), "Level:[%d]
Si adaugam Rob:[%d/15]
iar la sfarsitul randului adagaum robstat
Trebuie sa aveti ceva de genu
format(coordsstring, sizeof(coordsstring), "Level:[%d] Sex:[%s] Age:[%d] Origin:[%s] SpawnHealth:[%.1f] Cash:[$%d] Bank:[$%d] Ph:[%d] [Rob:[%d/15]", level,atext,age,otext,shealth+50, cash, account, pnumber, robstat);
Cautam OnGameModeInit
si adaugam
AddStaticVehicleEx(482,1883.0640,-1996.7705,13.6613,179.9492,0,0,60000); //Burrito -/rob *254*-
Cautam
format(string, sizeof(string), " Paycheck: $%d Tax Money: -$%d", checks, TaxValue);
Si mai jos adaugam
PlayerInfo[i][pRob] += 1;
Cautam OnPlayerRegister
iar mai jos adaugam
format(var, 32, "RobSkill=%d\n",PlayerInfo[playerid][pRobSkill]);fwrite(hFile, var);
iar mai jos adaugam
format(var, 32, "Rob=%d\n",PlayerInfo[playerid][pRob]);fwrite(hFile, var);
cautam OnPlayerUpdate
iar mai jos adaugam
format(var, 32, "RobSkill=%d\n",PlayerInfo[playerid][pRobSkill]);fwrite(hFile, var);
iar mai jos
format(var, 32, "Rob=%d\n",PlayerInfo[playerid][pRob]);fwrite(hFile, var);
Cautam OnPlayerLogin
iar mai jos adaugam
if( strcmp( key , "RobSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRobSkill] = strvalEx( val ); }
if( strcmp( key , "Rob" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRob] = strvalEx( val ); }
Cautam OnPlayerCommandText
si adaugam
//----------------------------------[ROB]-----------------------------------------------
if(strcmp(cmd, "/rob", true) == 0)
{
if(PlayerInfo[playerid][pRob] >= 15)
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerInVehicle(playerid, 254))
{
CP[playerid] = 50;
SetPlayerCheckpoint(playerid, 1460.9639, -1022.6666, 23.8281, 3.0);
SendClientMessage(playerid, COLOR_YELLOW,"Drive this van to the City Bank.");
}
else
{
SendClientMessage(playerid, COLOR_GREY," You are not in the black van !");
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY," You are not able to rob the Bank now !");
RemovePlayerFromVehicle(playerid);
SetVehicleToRespawn(253);
return 1;
}
}
Cautam case 20:
{
PlayerInfo[giveplayerid][pRob] = amount;
format(string, sizeof(string), " The Player Rob Set To %d", amount);
}
Cautam if(strcmp(cmd, "/help", true) == 0)
Iar pe unul dintre randurile acelea cu SendClientMessage adaugam la sfarsit
/rob
Cautam if(strcmp(cmd, "/skill", true)==0)
si adaugam la skill info
11: Rob");
--> in loc de 1 adaugati un numar ca sunt crescatoare si poate aveti deja numarul 11
iar mai jos la randurile cu else if adaugam
else if(strcmp(x_nr,"11",true) == 0)//Robbing
{
new level = PlayerInfo[playerid][pRobSkill];
if(level >= 0 && level <= 50) { SendClientMessage(playerid, COLOR_YELLOW, "Your Rob Skill Level = 1."); format(string, sizeof(string), "You need to Rob the City Bank %d more times to Level up.", 50 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 51 && level <= 250) { SendClientMessage(playerid, COLOR_YELLOW, "Your Rob Skill Level = 2."); format(string, sizeof(string), "You need to Rob the City Bank %d more times to Level up.", 100 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 251 && level <= 500) { SendClientMessage(playerid, COLOR_YELLOW, "Your Rob Skill Level = 3."); format(string, sizeof(string), "You need to Rob the City Bank %d more times to Level up.", 200 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 501 && level <= 999) { SendClientMessage(playerid, COLOR_YELLOW, "Your Rob Skill Level = 4."); format(string, sizeof(string), "You need to Rob the City Bank %d more times to Level up.", 400 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
else if(level >= 1000) { SendClientMessage(playerid, COLOR_YELLOW, "Your Rob Skill Level = 5."); }
}
Sper sa va fie de folos lam postat pentru ca vad ca multi cauta acest tutorial/SYSTEM si mai fac posturi pe unde nu trebuie
ATENTIE acest tutorial e pentru mod-ul GODFATHER/ROLEPLAY
Ok dupa ce ati facut tot ce vam zis dati CTRL+F si cautati
else if(CP[playerid] == 50
Daca gaseste doar 1 adica cel din tutorial mai dati o data CTRL+F si cautati
if(CP[playerid] == 50
Daca nu gaseste nimic inseamna ca e bine , acum sa va zic ce faceti daca gaseste
-1.Dati CTRL+F si cautati OnPlayerEnterCheckpoint
acum mai jos trebuie sa aveti mai multe else if(CP[playerid] == ... (<- un numar) cautati care e ultimul numar de exemplu 19 ultimul checkpoint
-1.2. Dati ctrl+f si cautati
else if(CP[playerid] == 50)//Robbing1
Modificati numarul 50 astfel incat sa fie crescator in cazul exemplului in care am ultimul numar 19 --> 50 il modificam in 20
-2.Acum cautati else if(CP[playerid] == 51)//Robbing2
sau daca ati luat al 2-lea cod cautati if(CP[playerid] == 51)//Robbing2 modificati 51 la fel ca mai sus astfel incat sa fie crescator Dupa ce ati facut toate astea dati un ultim compile si daca va da errori dati reply daca nu Have fun EDIT: ATENTIE !!! acest system nu e facut de mine nush sigur de cine e facut sa il postez daca stiam il treceam Am facut acest edit ca vad ca sariti in sus :-j daca era sa zic ceva de credite si sa fiu un nub dala de schimba credite scriam credits ch1nezu :-j