Code:
public PressedCalladmin(id, key) {
log_amx("[CA Menu] CallAdmin")
if (dbc == SQL_FAILED) return PLUGIN_HANDLED
new argu[20]
new servername[200]
new name[32]
new zeit[21]
get_cvar_string("hostname",servername,100)
get_user_name(id,name,31)
get_time("%d.%m.%Y - %H:%M:%S",zeit,21)
switch(key) {
case 0: {
copy(argu,19,"Cheater")
}
case 1: {
copy(argu,19,"Bot")
}
case 2: {
copy(argu,19,"Mapchange")
}
case 3: {
copy(argu,19,"Sonstiges")
}
case 9: {
return PLUGIN_HANDLED
}
}
result = dbi_query(dbc,"INSERT INTO calladmins (nickname,server,grund,datum) VALUES ( '%s','%s','%s','%s' )",name,servername,argu,zeit)
set_hudmessage(255, 0, 0, -1.0, 0.00, 0, 6.0, 12.0)
show_hudmessage(id, "Die Anfrage wurde gesendet: SteamID: %s <> Grund: %s <> Server: %s <> Datum: %s",name,argu,servername,zeit)
if (result == RESULT_OK) dbi_free_result(result)
if (result == RESULT_FAILED) return PLUGIN_HANDLED
new dbitype[32]
dbi_type(dbitype,32)
console_print(id,"Ein Admin wurde verstaendigt")
return PLUGIN_HANDLED
}
The var name is always empty... but all other var's are filled with the right value and the skript writes the text("Ein Admin wurde verstaendigt") on the client's console