Quote:
Originally Posted by allenwr
set_user_godmode(player)
switch(get_cvar_num("amx_show_activity")) {
case 2: client_print(0,print_chat,"ADMIN %s: disabled godmode on %s",admin_name,target_name)
case 1: client_print(0,print_chat,"ADMIN: disabled godmod
to
set_user_godmode(player,0)
switch(get_cvar_num("amx_show_activity")) {
case 2: client_print(0,print_chat,"ADMIN %s: disabled godmode on %s",admin_name,target_name)
case 1: client_print(0,print_chat,"ADMIN: disabled godmod
same with no clip
|
Quote:
Originally Posted by allenwr
the author needs to get on line and fix his plugin...
|
What do you mean... If you dont specify a second parameter it will be disabled
Code:
static cell AMX_NATIVE_CALL set_user_godmode(AMX *amx, cell *params) // set_user_godmode(index, godmode = 0); = 2 params
{
/* Sets player godmode. If you want to disable godmode set only first parameter. */
// params[1] = index
// params[2] = godmode = 0
// Check index.
CHECK_PLAYER(params[1]);
// Get player pointer.
edict_t *pPlayer = MF_GetPlayerEdict(params[1]);
if (params[2] == 1) {
// Enable godmode
pPlayer->v.takedamage = 0.0; // 0.0, the player doesn't seem to be able to get hurt.
}
else {
// Disable godmode
pPlayer->v.takedamage = 2.0; // 2.0 seems to be standard value?
}
return 1;
}
As for adding this to menu, i presume you would add something like this to addons/amxmodx/configs/clcmds.ini?
Code:
"Noclip player" "amx_noclip #%userid%" "b" "u"
"Godmode player" "amx_noclip #%userid%" "b" "u"
Correct me if im wrong, i dont use the menu plugins
__________________