SA-MP Forums Archive
No saving stats - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: No saving stats (/showthread.php?tid=552868)



No saving stats SQLITE - Cerealguy - 27.12.2014

I use a command to give me a money to test put /q and check in db , Money = 0 D:

pawn Код:
stock ReturnPlayerName(playerid)
{
    new pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
    return pname;
}
#define GetPlayerName(%0)   ReturnPlayerName(%0)
In OnPlayerDisconnect
pawn Код:
format(Query, sizeof(Query), "UPDATE `users` SET Money = '%d', Score = '%d', EXP = '%d', Kills = '%d', Deaths = '%d', Wanted = '%d', JailTime = '%d', Job = '%d', Fstyle = '%d', PlaceHit = '%d', C4 = '%d', tie = '%d', BC = '%d', BP = '%d', Cutie = '%d', Dia = '%02d', Mes = '%02d', Ano = '%d', IP = '%s' WHERE `username` = '%s' COLLATE NOCASE",
                                                                                                        GetPlayerMonez(playerid),
                                                                                                        GetPlayerScore(playerid),
                                                                                                        pInfo[playerid][EXP],
                                                                                                        pInfo[playerid][Kills],
                                                                                                        pInfo[playerid][Deaths],
                                                                                                        pInfo[playerid][Wanted],
                                                                                                        pInfo[playerid][JailTime],
                                                                                                        pInfo[playerid][Job],
                                                                                                        pInfo[playerid][FStyle],
                                                                                                        pInfo[playerid][Placehit],
                                                                                                        pInfo[playerid][C4],
                                                                                                        pInfo[playerid][Tie],
                                                                                                        pInfo[playerid][BreakC],
                                                                                                        pInfo[playerid][BreakP],
                                                                                                        pInfo[playerid][Cutie],
                                                                                                        day,
                                                                                                        month,
                                                                                                        year,
                                                                                                        pInfo[playerid][Uip],
                                                                                                        DB_Escape(GetPlayerName(playerid))); // Gather the name of the player then escape it.
    // querying the formatted Query
    db_query(Database, Query);



Respuesta: No saving stats - Cerealguy - 27.12.2014

BUMP!!!!!!!!!


Re: No saving stats - JeaSon - 27.12.2014

can you show us the /setmoney command ?


Respuesta: No saving stats - Cerealguy - 27.12.2014

pawn Код:
CMD:money(playerid, params[])
{
    GivePlayerMonez(playerid, 10000);
    return 1;
}
is basic to test


Re: Respuesta: No saving stats - Irektyou11 - 27.12.2014

Quote:
Originally Posted by Cerealguy
Посмотреть сообщение
pawn Код:
CMD:money(playerid, params[])
{
    GivePlayerMonez(playerid, 10000);
    return 1;
}
is basic to test
You made a mistake while making the command!

[QUOTE=Cerealguy;3303059][pawn]
CMD:money(playerid, params[])
{
GivePlayerMonez(playerid, 10000);
return 1;

You made money to monez by mistake here take this code

Код:
CMD:money(playerid, params[])
{
	GivePlayerMoney(playerid, 10000);
	return 1;
if you think it worked hit that rep button.


Re: No saving stats - JeaSon - 27.12.2014

use this our one is incorrrect
pawn Код:
CMD:money(playerid, params[])
{
    GivePlayerMoney(playerid, 10000);
    return 1;
}

EDIT:late


Respuesta: No saving stats - Cerealguy - 27.12.2014

i use a include for anti-moneyhack. is monez


Re: Respuesta: No saving stats - Irektyou11 - 27.12.2014

Quote:
Originally Posted by Cerealguy
Посмотреть сообщение
i use a include for anti-moneyhack. is monez
Dude i'm gonna tell you one small thing not being mean or anything, but you know, includes are very buggy for scripts they can result into, ruining your script, i say it's better if you, actually make your own system!, it's really easy.



Respuesta: No saving stats - Cerealguy - 27.12.2014

If it is, but it saves me a few lines, and not first before you use it and it has worked this same method to save the stats, and not because now not working


Re: Respuesta: No saving stats - Irektyou11 - 27.12.2014

Quote:
Originally Posted by Cerealguy
Посмотреть сообщение
If it is, but it saves me a few lines, and not first before you use it and it has worked this same method to save the stats, and not because now not working
Not being mean, but the more the time the more better the work, if someone wants to be idiot using some lame filiterscript that would actually make it suck defintley.