- 0
Resetare dupa relog
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
Punct.
Nick: Punct.
Problema: Daca cineva iese de pe server i se reseteaza conturl. Primeste valorile DEFAULT puse in baza de date.
Erori / warnings: -
Lini/script:
[pawn]
public GameModeInitExitFunc()
{
new string[182];
format(string, sizeof(string), "Server Restart, va rugam asteptati...");
foreach(Player, i)
{
SCM(i, c_alb, string);
SCont(i);
}
SetTimer("GameModeExitFunc", 3000, 0);
return 1;
}
public GameModeExitFunc()
{
KillTimer(vtimer);
SSeif();
STeri();
SCars();
KillTimer(timerr);
GameModeExit();
return 1;
}
/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
/* * OnGameModeExit * */
/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
public OnGameModeExit()
{
KillTimer(vtimer);
for(new i=0; i<MAX_PLAYERS; i++)
{
TextDrawDestroy(FUEL);
TextDrawDestroy(HP);
TextDrawDestroy(Speed);
TextDrawDestroy(Name_V);
//TextDrawDestroy(Zones);
}
SSeif();
STeri();
SCars();
foreach(Player, i)
{
SCont(i);
}
KillTimer(timerr);
return 1;
}
public SCont(playerid)
{
mysql_format(mysql, query, sizeof(query), "UPDATE `players` SET `Level`='%d', `Money`='%d', `AdminLevel`='%d', `Kills`='%d', `Deaths`='%d', `HouseKey`='%d', `Spawn`='%d', `Tutorial`='%d', `Skin`='%d', `Job`='%d', `Curse`='%d', `Factiune`='%d', `Rank`='%d', `Lider`='%d', `Car`='%d' WHERE `ID`='%d'",
PlayerInfo[playerid][pLevel], PlayerInfo[playerid][pCash], PlayerInfo[playerid][pAdmin], PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths], PlayerInfo[playerid][pHouseKey], PlayerInfo[playerid][pSpawn], PlayerInfo[playerid][pTutorial], PlayerInfo[playerid][pSkin], PlayerInfo[playerid][pJob], PlayerInfo[playerid][pCurse], PlayerInfo[playerid][pFactiune], PlayerInfo[playerid][pRank], PlayerInfo[playerid][pLider], PlayerInfo[playerid][pCar], PlayerInfo[playerid][pID]);
mysql_tquery(mysql, query, "", "");
return 1;
}
[/pawn]
Ai incercat sa rezolvi singur ?: Da. Am incercat sa fac cu GameModeExitFunc si GameModeInitExitFunc
Nu mai deschideti in pu*a mea servere de SA:MP !
Jucati-va pe cele care sunt ! Sunt suficiente !
Reguli de bun simt:
My work
:::http://pastebin.com/VRNRcaAs2 answers to this question
Recommended Posts