[pomoc]Nece da sacuva score i novac na izlasku iz igrice

Započeo Arnel_Bp, Septembar 21, 2014, 16:28:15 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 3 gostiju pregledaju ovu temu.

Skripta koju koristim: Moja od 0
Detaljan opis problema: kao sto naslov kaze....Nece da sacuva score i novac na izlasku iz igrice
Dio skripte:
enum pInfo
{
    pAdminLevel,
    pCash,
    pScore,
}
new PlayerInfo[MAX_PLAYERS][pInfo];


na diskonekt

dini_IntSet(file, "Novac", PlayerInfo[playerid][pCash]);
dini_IntSet(file, "Score", PlayerInfo[playerid][pScore]);
dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][pAdminLevel]);


na registraciji
dini_IntSet(file, "Novac",PlayerInfo[playerid][pCash] = 500);
dini_IntSet(file, "Score",PlayerInfo[playerid][pScore] = 0);


na login

GivePlayerMoney(playerid, dini_Int(file, "Novac")-GetPlayerMoney(playerid));");
PlayerInfo[playerid][pAdminLevel] = dini_Int(file, "AdminLevel");
SetPlayerScore(playerid, PlayerInfo[playerid][pScore]);


moze neka pomoc? Hvala
Neke slike/video za lakse dobivanje pomoci(neobavezno):
Poslednja Izmena: Septembar 21, 2014, 16:28:52 POSLE PODNE od Arnel_Bp

daj mi cijeli onplayerdisconnect public


[FS]Rent
[FS] Vremenska prognoza
[TuT] PayDay
[TuT]PayDay sistem[UPDATED]
Moja Biografija

Respect:Mr.Gagi,FlasH,Streetboy,David (Sabljak) A.k.A SABO(T)
ÄŒovjek nije stvoren za poraze, moze biti unisten, ali ne i pobjeÄ'en!

Evo, samo probaj da pomognes :D

public OnPlayerDisconnect(playerid, reason)
{
    new msg[128];
new name[32];
    GetPlayerName(playerid, name, sizeof(name));
format(msg, sizeof(msg), "\2;%s(%d) je napustio server. (%s)\2;", name,playerid,aDisconnectNames[reason]);
new ConnectName[30], str[100];
GetPlayerName(playerid, ConnectName, 30);
switch (reason)
{
case 0: format(str, 256, "%s je napustio server! (Timeout)", ConnectName);
case 1: format(str, 256, "%s je napustio server! (Leaving)", ConnectName);
case 2: format(str, 256, "%s je napustio server! (Kicked/Banned)", ConnectName);
    }
    SendClientMessageToAll(0x808080AA, str);
zoneupdates[playerid] = 0;
player_zone[playerid] = -1;
new file[256];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), SERVER_USER_FILE, name);
if(gPlayerLogged[playerid] == 1)
{
dini_IntSet(file, "Score", PlayerInfo[playerid][pScore]);
dini_IntSet(file, "BreakOut", PlayerInfo[playerid][pBreakOut]);
dini_IntSet(file, "Uncuff", PlayerInfo[playerid][pUncuff]);
dini_IntSet(file, "Fix", PlayerInfo[playerid][pFix]);
dini_IntSet(file, "DPs", PlayerInfo[playerid][pBodovi]);
dini_IntSet(file, "Arrest", PlayerInfo[playerid][pArrest]);
dini_IntSet(file, "Taze", PlayerInfo[playerid][pTaze]);
dini_IntSet(file, "Novac", PlayerInfo[playerid][pCash]);
dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][pAdminLevel]);
dini_IntSet(file, "JailCards",PlayerInfo[playerid][ pJailCard]);
dini_IntSet(file, "RobLevel",PlayerInfo[playerid][pRobRank]);
    dini_IntSet(file, "Frozen", PlayerInfo[playerid][pFrozen]);
    dini_IntSet(file, "DonatorLevel",PlayerInfo[playerid][pDonatorLevel]);
    dini_IntSet(file, "SWATLevel",PlayerInfo[playerid][pSwatLevel]);
    dini_IntSet(file, "PagatiLevel",PlayerInfo[playerid][pPagatiLevel]);
    dini_IntSet(file, "ArmyLevel",PlayerInfo[playerid][pArmyLevel]);
    dini_IntSet(file, "CanUseSWAT",PlayerInfo[playerid][pCanUseSWAT]);
    dini_IntSet(file, "CanUseArmy",PlayerInfo[playerid][pCanUseArmy]);
    dini_IntSet(file, "CanUseAPagati",PlayerInfo[playerid][pCanUsePagati]);
}
    gPlayerLogged[playerid] = 0;
SakrijTD(playerid);
if(IsBeingSpeced[playerid] == 1)
{
foreach(Player,i)
{
if(spectatorid[i] == playerid)
{
TogglePlayerSpectating(i,false);
}
}
}
    return 1;
}

jel ti ne cuva samo score i novac ili ti nista ne cuva?


[FS]Rent
[FS] Vremenska prognoza
[TuT] PayDay
[TuT]PayDay sistem[UPDATED]
Moja Biografija

Respect:Mr.Gagi,FlasH,Streetboy,David (Sabljak) A.k.A SABO(T)
ÄŒovjek nije stvoren za poraze, moze biti unisten, ali ne i pobjeÄ'en!



score ti ne cuva jer si stavio
   dini_IntSet(file, "Score",PlayerInfo[playerid][pScore] = 0);
pa stavi mu 1

GivePlayerMoney(playerid, dini_Int(file, "Novac")-GetPlayerMoney(playerid));");

nisan siguran al ja msm da ti ovaj - briše novac.

ako maknem - onda mi ima 4 erora, a ako stavim u mjesto ovoga minusa zarez onda mi 1 warning ima, pa sta da mu radim?

: warning 202: number of arguments does not match definition

stavis giveplayermoney(playerid, moneyenum);


[FS]Rent
[FS] Vremenska prognoza
[TuT] PayDay
[TuT]PayDay sistem[UPDATED]
Moja Biografija

Respect:Mr.Gagi,FlasH,Streetboy,David (Sabljak) A.k.A SABO(T)
ÄŒovjek nije stvoren za poraze, moze biti unisten, ali ne i pobjeÄ'en!

Citat: xyzcod2 poslato Septembar 23, 2014, 20:03:17 POSLE PODNE
stavis giveplayermoney(playerid, moneyenum);

pa kako to da zamijenim znaci ovo sto sam gore postavio sa giveplayermoney(playerid, pCash); ?

GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);


[FS]Rent
[FS] Vremenska prognoza
[TuT] PayDay
[TuT]PayDay sistem[UPDATED]
Moja Biografija

Respect:Mr.Gagi,FlasH,Streetboy,David (Sabljak) A.k.A SABO(T)
ÄŒovjek nije stvoren za poraze, moze biti unisten, ali ne i pobjeÄ'en!


stavi ovo pa testiraj i onda mi posalji server log
public OnPlayerDisconnect(playerid, reason)
{
    new msg[128];
new name[32];
    GetPlayerName(playerid, name, sizeof(name));
format(msg, sizeof(msg), "\2;%s(%d) je napustio server. (%s)\2;", name,playerid,aDisconnectNames[reason]);
new ConnectName[30], str[100];
GetPlayerName(playerid, ConnectName, 30);
switch (reason)
{
case 0: format(str, 256, "%s je napustio server! (Timeout)", ConnectName);
case 1: format(str, 256, "%s je napustio server! (Leaving)", ConnectName);
case 2: format(str, 256, "%s je napustio server! (Kicked/Banned)", ConnectName);
    }
    print("1");
    SendClientMessageToAll(0x808080AA, str);
zoneupdates[playerid] = 0;
player_zone[playerid] = -1;
new file[256];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), SERVER_USER_FILE, name);
if(gPlayerLogged[playerid] == 1)
{
    print("2");
dini_IntSet(file, "Score", PlayerInfo[playerid][pScore]);
dini_IntSet(file, "BreakOut", PlayerInfo[playerid][pBreakOut]);
dini_IntSet(file, "Uncuff", PlayerInfo[playerid][pUncuff]);
dini_IntSet(file, "Fix", PlayerInfo[playerid][pFix]);
dini_IntSet(file, "DPs", PlayerInfo[playerid][pBodovi]);
dini_IntSet(file, "Arrest", PlayerInfo[playerid][pArrest]);
dini_IntSet(file, "Taze", PlayerInfo[playerid][pTaze]);
dini_IntSet(file, "Novac", PlayerInfo[playerid][pCash]);
dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][pAdminLevel]);
dini_IntSet(file, "JailCards",PlayerInfo[playerid][ pJailCard]);
dini_IntSet(file, "RobLevel",PlayerInfo[playerid][pRobRank]);
    dini_IntSet(file, "Frozen", PlayerInfo[playerid][pFrozen]);
    dini_IntSet(file, "DonatorLevel",PlayerInfo[playerid][pDonatorLevel]);
    dini_IntSet(file, "SWATLevel",PlayerInfo[playerid][pSwatLevel]);
    dini_IntSet(file, "PagatiLevel",PlayerInfo[playerid][pPagatiLevel]);
    dini_IntSet(file, "ArmyLevel",PlayerInfo[playerid][pArmyLevel]);
    dini_IntSet(file, "CanUseSWAT",PlayerInfo[playerid][pCanUseSWAT]);
    dini_IntSet(file, "CanUseArmy",PlayerInfo[playerid][pCanUseArmy]);
    dini_IntSet(file, "CanUseAPagati",PlayerInfo[playerid][pCanUsePagati]);
}
    gPlayerLogged[playerid] = 0;
print("3");
SakrijTD(playerid);
if(IsBeingSpeced[playerid] == 1)
{
foreach(Player,i)
{
if(spectatorid[i] == playerid)
{
TogglePlayerSpectating(i,false);
}
}
}
print("4");
    return 1;
}


[FS]Rent
[FS] Vremenska prognoza
[TuT] PayDay
[TuT]PayDay sistem[UPDATED]
Moja Biografija

Respect:Mr.Gagi,FlasH,Streetboy,David (Sabljak) A.k.A SABO(T)
ÄŒovjek nije stvoren za poraze, moze biti unisten, ali ne i pobjeÄ'en!

Testirano ali nece... nece pa nece, ja nzm sta da mu radimo vise, sta mu je problem....  8) 8) 8)

Nisam ni napravio nista da bi radilo vec sam dodao print funkcije da vidim jeli sve dobro radi, tako da mi posalji server log da vidim


[FS]Rent
[FS] Vremenska prognoza
[TuT] PayDay
[TuT]PayDay sistem[UPDATED]
Moja Biografija

Respect:Mr.Gagi,FlasH,Streetboy,David (Sabljak) A.k.A SABO(T)
ÄŒovjek nije stvoren za poraze, moze biti unisten, ali ne i pobjeÄ'en!