AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   help me plz (https://forums.alliedmods.net/showthread.php?t=50716)

sb123 02-02-2007 05:50

help me plz
 
L 02/02/2007 - 03:47:05: Invalid player id 102
L 02/02/2007 - 03:47:05: [AMXX] Run time error 10 (plugin "quake_like.amxx") (native "client_cmd") - debug not enabled!
L 02/02/2007 - 03:47:05: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).

http://w3arcade.net/quake_like.sma

ths...

dutchmeat 02-02-2007 06:13

Re: help me plz
 
enable debugging on that plugin, we can't see which client_cmd is invalid.

edit you could try this:

Code:
#include <amxmodx> readSettings( ) {    new flags[12]    get_cvar_string( "amx_q3_mode" , flags ,11)    return read_flags( flags ) } public client_putinserver(id) {    if ( readSettings( ) & 8 ) {       set_task ( 2.0 , "enterMsg" , id )    }    return PLUGIN_CONTINUE } public enterMsg (id){ if (is_user_connected(id))   client_cmd( id , "spk q3/enter" ) } public client_disconnect(id) {   if ( readSettings( ) & 16)       client_cmd(0,"spk q3/leave")   return PLUGIN_CONTINUE } public newRound ( ) {    new roundtime = floatround( get_cvar_float("mp_roundtime") * 60.0 )    if ( roundtime == read_data(1) && readSettings( ) & 4 )           client_cmd(0,"spk q3/prepare")    return PLUGIN_CONTINUE } public makeDamage( victim ) {    new wpn, hitzone,  attacker = get_user_attacker(victim,wpn,hitzone)    if ( !attacker ) return    new teamA = get_user_team ( attacker )    new teamV = get_user_team ( victim )    if ( teamV == teamA ) {       if ( readSettings( ) & 2 )           client_cmd(attacker,"spk q3/ashot1")    }    else if ( readSettings( ) & 1 )       client_cmd(attacker,"spk q3/ashot2") }   public plugin_precache() {    precache_sound( "q3/ashot2.wav" )    precache_sound( "q3/ashot1.wav" )    precache_sound( "q3/prepare.wav" )    precache_sound( "q3/enter.wav" )    precache_sound( "q3/leave.wav" )    return PLUGIN_CONTINUE }   public plugin_init() {    register_plugin ("Quake like","1.2","DanRaZor")    register_event  ("Damage"      ,"makeDamage" ,"b","2!0","3=0","4!0")    register_event  ("RoundTime"   ,"newRound"   ,"bc")    register_cvar   ("amx_q3_mode" ,"abde" )    return PLUGIN_CONTINUE }

jim_yang 02-02-2007 06:27

Re: help me plz
 
check is_user_connected(attacker)

sb123 02-02-2007 06:56

Re: help me plz
 
Not..Bomb explosion in Consoles

L 02/02/2007 - 19:00:36: Invalid player id 112
L 02/02/2007 - 19:00:36: [AMXX] Run time error 10 (plugin "quake_like.amxx") (native "client_cmd") - debug not enabled!
L 02/02/2007 - 19:00:36: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).

jim_yang 02-02-2007 07:16

Re: help me plz
 
place this line
if(!attacker) return
with
if(!is_user_connected(attacker) || is_user_bot(attacker)) return

sb123 02-02-2007 07:22

Re: help me plz
 
好的,我试试

sb123 02-02-2007 07:33

Re: help me plz
 
OK....Thanks all...


All times are GMT -4. The time now is 00:40.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.