Detaljan opis problema: Imam problem na /rob komandu, sve lijepo radi, ali nece da ucita wanted level, kada nekoga opljackam pise mi Wanted level 0? A ja sam stavio ako opljacka SWAT/Army da bude wanted lvl 4 a ovako wl 2 pa sta je sad tu problem?
Dio skripte:
CMD:rob(playerid, params[])
{
new id, string;
if(Ulogiran == 0) return SendClientMessage(playerid, 0xFF0000FF, "Nisi ovlascen da koristis ovu komandu");
if(gTeam == TEAM_COP) return SendClientMessage(playerid, 0xFF0000FF, "Nisi ovlascen da koristis ovu komandu");
if(gTeam == TEAM_ARMY) return SendClientMessage(playerid, 0xFF0000FF, "Nisi ovlascen da koristis ovu komandu");
if(gTeam == TEAM_SWAT) return SendClientMessage(playerid, 0xFF0000FF, "Nisi ovlascen da koristis ovu komandu");
if(gTeam == TEAM_FBI) return SendClientMessage(playerid, 0xFF0000FF, "Nisi ovlascen da koristis ovu komandu");
if(cuffed == 1) return SCMF(playerid, 0xFF0000FF, "Ti posjedujes lisice na sebi i ne mozes koristiti ovu komandu");
if(sscanf(params, "ui", id)) return SCM(playerid, 0xFF0000FF, "Koristi: /rob ");
if(!IsPlayerConnected(id)) return SCM(playerid, 0xFF0000FF, "ID igraca koji ste unijeli nije online.");
if(IsPlayerInAnyVehicle(id)) return SCMF(playerid, 0xFF0000FF, "Igrac %s(%d) je u vozilu i nemozes njega opljackati",GetName(id),id);
if(IsPlayerInAnyVehicle(playerid)) return SCMF(playerid, 0xFF0000FF, "Ne mozes opljackati %s(%d) jer si u vozilu, napusti vozilo i pokusaj opet da ga opljackas",GetName(id),id);
if(GetDistanceBetweenPlayers(playerid,id) > 4) return SCMF(playerid, 0xFF0000FF, "Igrac %s(%d) je suvise daleko od tebe, probaj mu se pribliziti i opljackati",GetName(id),id);
if(Ulogiran == 0) return SCMF(playerid, 0xFF0000FF, "Igrac %s(%d) je mrtav, nemozes ga opljackati",GetName(id),id);
if(cuffed == 1) return SCMF(playerid, 0xFF0000FF, "Igrac %s(%d) posjeduje lisice na sebi i nemozes ga opljackati",GetName(id),id);
if(GetPlayerMoney(id) <= 100) return SCMF(playerid, 0xFF0000FF, "Igrac %s(%d) ne posjeduje dovoljno novca da bi ga mogao opljackati",GetName(id),id);
if(beenrobbedrecently >= 1) return SCMF(playerid, 0xFF0000FF, "Igrac %s(%d) je nedavno opljackan. Pricekaj pa pokusaj ponovo",GetName(id),id);
new rname;
new vname;
GetPlayerName(playerid,rname, 24);
GetPlayerName(id, vname, 24);
new pcash = random(GetPlayerMoney(id));
format(string, sizeof(string), "%s(%d) je opljackao $%d od %s(%d)",rname,playerid,pcash,vname,id);
printf("%s", string);
GivePlayerMoney(playerid,pcash);
GivePlayerMoney(id, -pcash);
format(string, sizeof(string), "%s(%d) je opljackao $%d od tebe", rname,playerid,pcash);
SendClientMessage(id, 0xD2691EAA, string);
format(string, sizeof(string), "Ti si opljackao $%d od %s(%d)", pcash,vname,id);
SendClientMessage(playerid, 0x00C7FFAA, string);
format(string, sizeof(string), "~w~Opljackan od ~n~%s(%d)~n~uzeto $%d",rname,playerid,pcash);
GameTextForPlayer(id,string,5000,3);
oscore = GetPlayerScore(playerid);
SetPlayerScore(playerid, oscore +1);
format(string, sizeof(string), "~w~Opljackao si %s(%d)~n~i uzeo $%d",vname,id,pcash);
GameTextForPlayer(playerid,string,5000,3);
RobbedPlyRecent =1;
beenrobbedrecently =120;
new current_zone;
current_zone = player_zone;
format(string, sizeof(string), "Osumljiceni %s(%d) je opljackao %s(%d). Lokacija: %s",rname,playerid,vname,id,zones);
COPSCM(0xFF0000FF,string);
if(gTeam == TEAM_COP || gTeam == TEAM_ARMY || gTeam == TEAM_FBI || gTeam == TEAM_SWAT)
{
new plwl = GetPlayerWantedLevel(playerid);
SetPlayerWantedLevel(playerid, plwl +4 );
}
else
{
new plwl = GetPlayerWantedLevel(playerid);
GetPlayerWantedLevel(playerid, plwl +2 );
}
new pcol = GetPlayerColor(playerid);
new plwl = GetPlayerWantedLevel(playerid);
format(string, sizeof(string), "(ROBBERY) Wanted Level %d",plwl);
SendClientMessage(playerid,pcol,string);
return 1;
}Neke slike/video za lakse dobivanje pomoci(neobavezno):
