Problem(error/warning): Naime, kada neko prodje kroz bilo koji cp nebitno da li je preko /gps, autoskola, poslovi kada prodje neko kroz njega on dobije platu, kako da resim pomoc molim vas!!!
Dio skripte: [ pawn ]vaš odgovor[ /pawn ]
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): [ code ]vaš odgovor[ /code ]
Slika/video ingame problema(obavezno ako je ingame problem): https://imgur.com/a/EIwkxt4
Citat: V01D poslato Mart 26, 2020, 19:55:09 POSLE PODNE
Daj ceo callback OnPlayerEnterCheckpoint
Evo ovo je samo do polaganje za cp posle imaju i poslovi i gps itd...
[pawn]public OnPlayerEnterCheckpoint(playerid)
{
new carid = GetPlayerVehicleID(playerid);
if(AC[0][acTeleportCPHack] == 1)
{
if(!lz_ProveriBrzinu(playerid, false))
{
if(Lociranje[playerid] == 0 && PI[playerid][pAdmin] < 1)
{
CP_Teleport[playerid]++;
if(CP_Teleport[playerid] > 1)
{
if(CP_Teleport[playerid] > 2)
{
ACKick(playerid, "TeleportHack(CP)");
CP_Teleport[playerid] = 0;
}
else
{
ACWarning(playerid, "TeleportHack(CP)");
}
return true;
}
}
}
}
if(NeMozeCP[playerid] > 0)
{
NeMozeCP[playerid] = 0;
lz_DisablePlayerCheckpoint(playerid);
return true;
}
if(ASPolaze[playerid] > 0)
{
if(ASVozilo(GetPlayerVehicleID(playerid)) && GetPlayerState(playerid) == PL_ST_DRIVER)
{
if(ASPolaze[playerid] == 1)
{
lz_DisablePlayerCheckpoint(playerid);
cp_SetPlayerCheckpoint(playerid, -2083.9470,-146.2726,35.3203, 4);
ASPolaze[playerid] = 2;
SCM(playerid, -1, "{007FFF}S » {FFFFFF}Nastavite dalje.");
}
else if(ASPolaze[playerid] == 2)
{
lz_DisablePlayerCheckpoint(playerid);
cp_SetPlayerCheckpoint(playerid, -2083.8083,-165.5814,35.3203, 4);
ASPolaze[playerid] = 3;
SCM(playerid, -1, "{007FFF}S » {FFFFFF}Nastavite dalje.");
}
else if(ASPolaze[playerid] == 3)
{
lz_DisablePlayerCheckpoint(playerid);
cp_SetPlayerCheckpoint(playerid, -2090.2842,-173.0551,35.3203, 4);
ASPolaze[playerid] = 4;
SCM(playerid, -1, "{007FFF}S » {FFFFFF}Nastavite dalje.");
}
else if(ASPolaze[playerid] == 4)
{
lz_DisablePlayerCheckpoint(playerid);
cp_SetPlayerCheckpoint(playerid, -2083.8638,-177.8015,35.3203, 4);
ASPolaze[playerid] = 5;
SCM(playerid, -1, "{007FFF}S » {FFFFFF}Nastavite dalje.");
}
else if(ASPolaze[playerid] == 5)
{
lz_DisablePlayerCheckpoint(playerid);
cp_SetPlayerCheckpoint(playerid, -2079.4409,-193.0545,35.3203, 4);
ASPolaze[playerid] = 6;
SCM(playerid, -1, "{007FFF}S » {FFFFFF}Nastavite dalje.");
}
else if(ASPolaze[playerid] == 6)
{
lz_DisablePlayerCheckpoint(playerid);
cp_SetPlayerCheckpoint(playerid, -2061.3533,-193.0078,35.3203, 4);
ASPolaze[playerid] = 7;
SCM(playerid, -1, "{007FFF}S » {FFFFFF}Nastavite dalje.");
}
else if(ASPolaze[playerid] == 7)
{
lz_DisablePlayerCheckpoint(playerid);
cp_SetPlayerCheckpoint(playerid, -2053.7754,-187.2768,35.3274, 4);
ASPolaze[playerid] = 8;
SCM(playerid, -1, "{007FFF}S » {FFFFFF}Nastavite dalje.");
}
else if(ASPolaze[playerid] == 8)
{
lz_DisablePlayerCheckpoint(playerid);
cp_SetPlayerCheckpoint(playerid, -2053.8264,-169.3052,35.3203, 4);
ASPolaze[playerid] = 9;
SCM(playerid, -1, "{007FFF}S » {FFFFFF}Nastavite dalje.");
}
else if(ASPolaze[playerid] == 9)
{
lz_DisablePlayerCheckpoint(playerid);
cp_SetPlayerCheckpoint(playerid, -2061.7268,-151.9383,35.3203, 4);
ASPolaze[playerid] = 10;
SCM(playerid, -1, "{007FFF}S » {FFFFFF}Nastavite dalje.");
}
else if(ASPolaze[playerid] == 10)
{
lz_DisablePlayerCheckpoint(playerid);
cp_SetPlayerCheckpoint(playerid, -2053.9148,-139.1502,35.3274, 4);
ASPolaze[playerid] = 11;
SCM(playerid, -1, "{007FFF}S » {FFFFFF}Nastavite dalje.");
}
else if(ASPolaze[playerid] == 11)
{
lz_DisablePlayerCheckpoint(playerid);
cp_SetPlayerCheckpoint(playerid, -2043.9674,-127.3324,35.2584, 4);
ASPolaze[playerid] = 12;
SCM(playerid, -1, "{007FFF}S » {FFFFFF}Nastavite dalje.");
}
else if(ASPolaze[playerid] == 12)
{
new Float:vhp;
GetVehicleHealth(GetPlayerVehicleID(playerid), vhp);
if(vhp < 900)
{
SetVehicleToRespawn(GetPlayerVehicleID(playerid));
lz_DisablePlayerCheckpoint(playerid);
ASPolaze[playerid] = 0;
lz_SetPlayerPos(playerid, -2033.3922,-117.4472,1035.1759);
lz_SetPlayerInterior(playerid, 3);
SCM(playerid, -1, "{007FFF}S » {FFFFFF}Ostetili ste vozilo, zato niste ni dobili dozvolu.");
return true;
}
SetVehicleToRespawn(GetPlayerVehicleID(playerid));
lz_DisablePlayerCheckpoint(playerid);
LoadObjects(playerid, 5);
PI[playerid][pKolaDoz] = 1;
PI[playerid][pKolaDozVreme] = 300;
ASPolaze[playerid] = 0;
lz_SetPlayerPos(playerid, -2033.3922,-117.4472,1035.1759);
lz_SetPlayerInterior(playerid, 3);
lz_SetPlayerVirtualWorld(playerid, UsaoFirma[playerid]);
EnterijerUsao(playerid);
SCM(playerid, -1, "{007FFF}S » {FFFFFF}Polozili ste test i dobili ste vozacku dozvolu (trajanje 300h).");
SaveAccount(playerid);
}
}
return true;
}
[/pawn]
Citat: V01D poslato Mart 27, 2020, 09:30:50 PRE PODNE
[pawn]else if(DostavljaZlato[playerid] == 4 && PI[playerid][pJob] == 24)
{
if(PZavrsio[playerid] == 1) return NijeZavrsio(playerid);
PZavrsio[playerid] = 0;
KillTimer(PZavrsioTimer[playerid]);
lz_DisablePlayerCheckpoint(playerid);
new zarada = random(500)+5000;
#if NEWBIES_MONTH == 1
if(PI[playerid][pLevel] < 10)
{
zarada += zarada/3;
}
#endif
if(HappyJob == 24)
{
SCMF(playerid,-1,"{007FFF}S » {FFFFFF}Istovario si zlato, tvoja zarada iznosi: 2x$%d jer je upaljen happyjob na ovom poslu. (Dodaje se na platu)",zarada);
PI[playerid][pPlata] += zarada*2;
}
else
{
SCMF(playerid,-1,"{007FFF}S » {FFFFFF}Istovario si zlato, tvoja zarada iznosi: $%d. (Dodaje se na platu)",zarada);
PI[playerid][pPlata] += zarada;
}
PlayerJobFirmaNovac(playerid, VRSTA_ZLATO, zarada/4);
UltraPlata(playerid, 800);
SaveAccount(playerid);
DostavljaZlato[playerid] = 0;
SPD(playerid, DIALOG_DOSTAVLJAC_ZLATA, DIALOG_STYLE_MSGBOX, "{FFFA73}Dostavljac zlata", "{FFFFFF}Zelis li ponovo da krenes da dostavljas zlato?", "Da", "Ne");
return 1;
}[/pawn]
Probaj stavi return 1; na kraj kao sto sam ja. Znaci, po slici mozemo videti da igrac dobija 5000 dolara + bonus neki, tako da jedino gde igrac dobija toliko novca je na kraju bus vozaca i dostavljaca zlata, na bus vozacu stoji return true, tako da ciljam da je to bio problem, verovatno nije. Mada vredi opet pokusati.. Eh sada, ne vidim nijedan dobar razlog da se tako nesto desava, mada vredi probati..
Ukoliko ne radi, spremi se da posaljes sledece:
cp_SetPlayerCheckpoint
UltraPlata
tako da mozemo da proverimo da nije slucajno do toga..
[pawn]stock cp_SetPlayerCheckpoint(playerid, Float:xxe, Float:yye, Float:zze, Float:Range)
{
SetPlayerCheckpoint(playerid, xxe, yye, zze, Range);
CPX[playerid] = xxe;
CPY[playerid] = yye;
CPZ[playerid] = zze;
NeMozeCP[playerid] = 0;
}[/pawn]
[pawn]FUNCTION: UltraPlata(playerid, iznos)
{
if(PI[playerid][pGM] == 5)
{
lz_GivePlayerMoney(playerid, iznos);
SCMF(playerid, -1, "{FFFA73}+(ULTRA)PAYDAY: {FFFFFF}Dobili ste %d$ od posla zbog toga sto ste Super VIP!", iznos);
}
}[/pawn]
Nez dal sam lepo poslao cp_checkpoint proveri samo dal je stock toi to