Data lose
#1

I've made a command to ban players and insert their data of ban to another table seprated from the users one
PHP код:
    new DayMonthYear;
    
getdate(Year,Month,Day);
    new 
TwBiNDb[128]; //Time will be inserted in Database
    
format(TwBiNDbsizeof(TwBiNDb), "%i/%i/%i"DayMonthYear);
    
format(stringsizeof(string), "INSERT INTO bans (PlayerBanned, BannedBy, reason, ip, time, unban, BanType) VALUES ('%s', '%s', '%s', '%s', '%s', '%i', '1')",PlayerName(targetid), PlayerName(playerid), reasonPlayerIP(targetid), TwBiNDbunban);
    
mysql_query(1string);
    
mysql_log(LOG_ALL);
    new 
message[200];
    
format(messagesizeof(message), "%s has temporary banned by %s for %i day(s). Reason [%s]",PlayerName(targetid), PlayerName(playerid), timereason);
    
SendClientMessageToAll(COLOR_REDmessage);
    
SetTimerEx("ban"500false"i"targetid);
    
printf("[MySql]    %s"string); 
But when I got banned all the data of my account in the users table got removed except the date of register?!
Reply
#2

Can you show us your "Ban" public?

The one from this line:
pawn Код:
SetTimerEx("ban", 500, false, "i", targetid);
Reply
#3

PHP код:
Kick(playerid); 
Reply
#4

Bump!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)