Szerző Téma: Score mentése  (Megtekintve 737 alkalommal)

Nem elérhető BoSS

  • 816
    • Profil megtekintése
Score mentése
« Dátum: 2012. április 05. - 19:24:30 »
0 Show voters
Sziasztok nekem egy olyan script kéne ami elmenti a pontokat.
Elõre is köszönöm.

Nem elérhető CANNONN

  • 2139
    • Profil megtekintése
Score mentése
« Válasz #1 Dátum: 2012. április 06. - 10:18:20 »
0 Show voters
Hozz létre egy \"Pontok\" mappát a scriptfiles mappába.
 

#include a_samp
#include dini
 
public OnPlayerConnect(playerid)
{
new string[64], nev[MAX_PLAYER_NAME];
format(string, sizeof(string), \"Pontok/%s.ini\", nev);
if(dini_Exists(string)) return SetPlayerScore(playerid, dini_Int(string, \"Pontok\"));
else { dini_Create(string); }
return 1;
}
 
public OnPlayerDisconnect(playerid)
{
new string[64], nev[MAX_PLAYER_NAME];
format(string, sizeof(string), \"Pontok/%s.ini\", nev);
dini_IntSet(string, \"Pontok\", GetPlayerScore(playerid));
return 1;
}
« Utoljára szerkesztve: 2012. április 07. - 16:01:40 írta Cannonn »

Nem elérhető BoSS

  • 816
    • Profil megtekintése
Score mentése
« Válasz #2 Dátum: 2012. április 07. - 14:56:15 »
0 Show voters
Ezt a hibát írja
[pawn]C:\\Documents and Settings\\Rendszergazda\\Asztal\\pontok.pwn(12) : error 001: expected token: \")\", but found \"return\"
C:\\Documents and Settings\\Rendszergazda\\Asztal\\pontok.pwn(14) : warning 225: unreachable code
Pawn compiler 3.2.3664           Copyright © 1997-2006, ITB CompuPhase
1 Error[/pawn]

Nem elérhető CANNONN

  • 2139
    • Profil megtekintése
Score mentése
« Válasz #3 Dátum: 2012. április 07. - 16:01:48 »
+1 Show voters

#include a_samp
#include dini
 
public OnPlayerConnect(playerid)
{
new string[64], nev[MAX_PLAYER_NAME];
format(string, sizeof(string), \"Pontok/%s.ini\", nev);
if(dini_Exists(string)) return SetPlayerScore(playerid, dini_Int(string, \"Pontok\"));
else { dini_Create(string); }
return 1;
}
 
public OnPlayerDisconnect(playerid)
{
new string[64], nev[MAX_PLAYER_NAME];
format(string, sizeof(string), \"Pontok/%s.ini\", nev);
dini_IntSet(string, \"Pontok\", GetPlayerScore(playerid));
return 1;
}

Nem elérhető BoSS

  • 816
    • Profil megtekintése
Score mentése
« Válasz #4 Dátum: 2012. április 07. - 16:29:14 »
0 Show voters
Ment a + köszönöm zárok.

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal