Hey guys,
There's something crazy with the command get_user_info I don't understand.
get_user_info(pid, "name", name, 31) <- works
get_user_info(id, "fps_max", fps, 31) <- does not work
This is the Command to give the info to the client :
Code:
console_print(id,"[Fps-check] %s (%s) hat maximal %s(fps_max) bzw %s(fps_modem)",name,authid,fps,modem)
And actually fps and modem given out as strings are "" nothing and as number they are 0 :/
The name is okay but fps does not work.
So I wrote 2 classes to check fps and modem. But the code is quite 8 times long as the one with get_user_info
Code:
static abfrager
static name[32],iPlayers[32],pid, iNum
public ausgabe(id){
abfrager=id
get_players(iPlayers, iNum, "ch");
client_print(id,print_chat,"Have a look into the console..")
console_print(abfrager,"[Fps-check] Intializing...")
for(new i = 0; i < iNum; i++){
pid = iPlayers[i]
query_client_cvar(pid, "fps_max","reesults")
}
console_print(abfrager,"[Fps-check] Done...")
console_print(abfrager,"Thanks to Pinatz the developer of this Plugin")
console_print(abfrager,"Download it from")
console_print(abfrager,"http://catchmod.de")
return PLUGIN_HANDLED
}
public reesults(id, cvar_name[], cvar_value[]) {
get_user_name(id, name, 32)
get_user_authid ( id, authid[id], 30 )
console_print(abfrager,"[Fps-check] %s (%s) hat %s = %s",name,authid[id],cvar_name,cvar_value)
}
public getfpsmodem(id){
abfrager=id
get_players(iPlayers, iNum, "ch");
client_print(id,print_chat,"Have a look into the console..")
console_print(abfrager,"[Fps_modem-check] Intializing...")
for(new i = 0; i < iNum; i++){
pid = iPlayers[i]
query_client_cvar(pid, "fps_modem","ergebnisse")
}
console_print(abfrager,"[Fps_modem-check] Done...")
console_print(abfrager,"Download this plugin from")
console_print(abfrager,"http://catchmod.de")
return PLUGIN_HANDLED
}
public ergebnisse(id, cvar_name[], cvar_value[]) {
get_user_name(id, name, 32)
get_user_authid ( id, authid[id], 30 )
console_print(abfrager,"%s (%s) hat %s = %s",name,authid[id],cvar_name,cvar_value)
}
And you can not compare modem > fps. Because a fps_modem 336 kills a fps_modem 280 and they can use 336.. hm :/