30.07.2016, 20:43
Hi sorry if this has been asked before but cant find anything and searching plus one or +1 wont work in the forums search results.
Im trying to make it so i can see how many times a player has been kicked from the server
Im currently converting from ini to mysql and its going well but im stuck with adding +1 on a number in a row.
So like
If times kicked is 1 then this script adds a +1 to that making it 2
This is what iv done so far.
This was my old dini code that i used and am going off
Sorry if i explaned this a bit weird. Thanks in advance.
Edit: Sorry just relised this is proberbly in the wrong section. sorry about that.
Im trying to make it so i can see how many times a player has been kicked from the server
Im currently converting from ini to mysql and its going well but im stuck with adding +1 on a number in a row.
So like
If times kicked is 1 then this script adds a +1 to that making it 2
This is what iv done so far.
pawn Код:
stock ServerKick2(playerid, reason[])
{
new string[158];
new handle = SQL::OpenEx(SQL::READ, ""PLAYERS_TABLE"", "username", GetName(playerid));
SQL::WriteString(handle, "LastKickReason", reason);
SQL::WriteInt(handle, "TimesKicked", +1);
SQL::Close(handle);
Kick(playerid);
pawn Код:
if(dini_Exists(file))
{
dini_Set(file, "LastKickReason", reason);
dini_IntSet(file, "TimesKicked", (dini_Int(file, "TimesKicked") + 1));
}
Edit: Sorry just relised this is proberbly in the wrong section. sorry about that.