It says i have 83 cats!!! - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: It says i have 83 cats!!! (
/showthread.php?tid=148890)
It says i have 83 cats!!! -
NewTorran - 19.05.2010
pawn Код:
CMD:cats(playerid, params[])
{
new str[128];
format(str, sizeof str, "You have %i cats", CatInfo[playerid][Cats]);
SendClientMessage(playerid, colorWhite, str);
return 1;
}
It says i have 83 cats?
pawn Код:
format(query, sizeof(query), "SELECT `cats` FROM `users` WHERE `username` = '%s'", GetName(playerid));
samp_mysql_query(query);
samp_mysql_store_result();
samp_mysql_fetch_row(result);
samp_mysql_get_field(result, CatInfo[playerid][Cats]);
Although if i type:
pawn Код:
CMD:cat(playerid, params[])
{
CatInfo[playerid][Cats] = 2;
return 1;
}
And then type /cats it says i have 2!!!
Why is this?
Yes it says bombs, Thats a example image from something else, But the cats say 0 aswell
Re: It says i have 83 cats!!! -
Sergei - 19.05.2010
1. Stop spamming over all possible forums and topics with your problems.
2. Refer yourself to plugin's documentation to see what different functions actually do.
Re: It says i have 83 cats!!! - WackoX - 19.05.2010
You're getting the values from MySQL, but you never update nor save them.
Re: It says i have 83 cats!!! -
NewTorran - 19.05.2010
Quote:
Originally Posted by WackoX
You're getting the values from MySQL, but you never update nor save them.
|
What?
What i want is to just know why it says 83 and not 0
Re: It says i have 83 cats!!! - WackoX - 19.05.2010
Quote:
Originally Posted by Joe Torran C
Quote:
Originally Posted by WackoX
You're getting the values from MySQL, but you never update nor save them.
|
What?
What i want is to just know why it says 83 and not 0
|
Well then, from where do you load the variable 'CatInfo[playerid][Cats]'?
Re: It says i have 83 cats!!! -
NewTorran - 19.05.2010
Quote:
Originally Posted by WackoX
Quote:
Originally Posted by Joe Torran C
Quote:
Originally Posted by WackoX
You're getting the values from MySQL, but you never update nor save them.
|
What?
What i want is to just know why it says 83 and not 0
|
Well then, from where do you load the variable 'CatInfo[playerid][Cats]'?
|
What do you mean load it?