27.06.2009, 23:02
pawn Код:
dcmd_baninfo(playerid, params[])
{
if(pInfo[playerid][AdminLvl] >= Adm[baninfo])
{
new BanInfoIp[16], BanInfoString[128], BanInfoReason[96], BanInfoActive, BanInfoDate[64], BanInfoTime[64], BanInfoYear, BanInfoDay, BanInfoMonth, BanInfoType, BanInfoAdminName[MAX_PLAYER_NAME], BanInfoBannedAdmin[MAX_PLAYER_NAME], BanInfoHour;
if (sscanf(params, "s",BanInfoIp)) return SendClientMessage(playerid, red, "[SERVER]: Naudojimas: \"/baninfo [ip]\"");
format(param,128,"/baninfo %s",params);
LogPlayerCmd(playerid, -1, param, true);
new BanInfoIpDest[33];
samp_mysql_real_escape_string(BanInfoIp,BanInfoIpDest);
format(query,sizeof(query),"SELECT * FROM banai WHERE ip = '%s'",BanInfoIpDest);
samp_mysql_query(query);
samp_mysql_store_result();
if(samp_mysql_num_rows() == 0)
{
format(BanInfoString,128,"[SERVER]: IP adresas '%s' neegzistuoja musu sistemoje!",BanInfoIp);
SendClientMessage(playerid,red,BanInfoString);
return 1;
}
}
return 1;
}
my server crash i used real_escape_string, not help, what to do? this is really bad for me :/ anyone know how to fix?