[POMOC] Event

Započeo 3agle
5. Jul 2015. Zaključano
222
pregleda
4
postova
CH|pr0
4
Enforcer
5. Jul 2015.
Detaljan opis problema: Znaci, zelim da mi nakon eventa, za 1,2,3 mjesto automatski da nagradu.Medjutim,ja sam to stavio,ali pare igracu NEDA, neznam zasto.. Taj kod sam obriso,ovo je stari kakav je bio:
Slike://
Kod:
public OnPlayerEnterRaceCheckpoint(playerid)
{
if(CPProgess == TotalCP -1)
{
new
    TimeStamp,
    TotalRaceTime,
    string,
    rFile,
    pName,
rTime,
Prize,
TempTotalTime,
TempTime
;
Position++;
GetPlayerName(playerid, pName, sizeof(pName));
TimeStamp = GetTickCount();
TotalRaceTime = TimeStamp - RaceTick;
ConvertTime(var, TotalRaceTime, rTime, rTime, rTime);
switch(Position)
{
    case 1: Prize = (random(random(500)) + 3000);
            case 2: Prize = (random(random(450)) + 900);
    case 3: Prize = (random(random(400)) + 800);
    case 4: Prize = (random(random(350)) + 700);
    case 5: Prize = (random(random(300)) + 600);
    case 6: Prize = (random(random(250)) + 500);
    case 7: Prize = (random(random(200)) + 400);
    case 8: Prize = (random(random(150)) + 300);
    case 9: Prize = (random(random(100)) + 200);
    default: Prize = random(random(100));
}
format(string, sizeof(string), "|| EVENT CILJ! || %s || %d.%s (ID:%d)|| Vrijeme: %d:%d ||",RaceName, Position, pName, playerid, rTime, rTime);
SendClientMessageToAll(Plava, string);
if(FinishCount <= 5)
{
format(rFile, sizeof(rFile), "/rRaceSystem/%s.RRACE", RaceName);
    format(string, sizeof(string), "BestRacerTime_%d", TimeProgress);
    new randmoney = random(5000) + 4000;
    GivePlayerMoney(playerid, randmoney);
    TempTotalTime = dini_Int(rFile, string);
    ConvertTime(var1, TempTotalTime, TempTime, TempTime, TempTime);
    if(TotalRaceTime <= dini_Int(rFile, string) || TempTotalTime == 0)
    {
        dini_IntSet(rFile, string, TotalRaceTime);
format(string, sizeof(string), "BestRacer_%d", TimeProgress);
        if(TempTotalTime != 0)
format(string, sizeof(string), "REKORD OBOREN! Rekord oborio: | %s | Cestitamo!", pName, dini_Get(rFile, string), -(rTime - TempTime), TimeProgress+1);
                SendClientMessageToAll(YELLOW, string);
format(string, sizeof(string), "BestRacer_%d", TimeProgress);
dini_Set(rFile, string, pName);
TimeProgress++;
    }
}
FinishCount++;
//GivePlayerMoney(playerid, Prize);
//SetPlayerScore(playerid, GetPlayerScore(playerid) + Prize);
DisablePlayerRaceCheckpoint(playerid);
CPProgess++;
if(FinishCount >= JoinCount) return StopRace();
    }
else
{
CPProgess++;
CPCoords[CPProgess]++;
RacePosition = floatround(CPCoords[CPProgess], floatround_floor);
    SetCP(playerid, CPProgess, CPProgess+1, TotalCP, RaceType);
    PlayerPlaySound(playerid, 1137, 0.0, 0.0, 0.0);
}
    return 1;
}

Molim vas da mi stavite //nagrada, tamo gdje ste napravili.
Dinox51
4
Enforcer
5. Jul 2015.
Ova linija GivePlayerMoney(playerid,randommoney);
Ti ne valja...
Stavi na vrhu new id;
i onda
GivePlayerMoney(id,randommoney);
CH|pr0
4
Enforcer
5. Jul 2015.
Jel mi možeš cijeli kod poslat,uključujući ovo za nagrade, jer evo probo sam opet NE RADI mi ?Aj molim te je*em se s tim cjeli dan..
Dinox51
4
Enforcer

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha