AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Hook_deathmessage (https://forums.alliedmods.net/showthread.php?t=128982)

edgaras85 06-07-2010 15:10

Hook_deathmessage
 
PHP Code:

public Hook_Deathmessage()
{
 if( 
get_pcvar_numgDrShopOn ) == )
 {
  new 
id read_data);
  
HasHealthid ] = false;
 }
 return 
PLUGIN_CONTINUE;


Error:
Quote:

L 06/07/2010 - 12:56:16: [AMXX] Run time error 4: index out of bounds
L 06/07/2010 - 12:56:16: [AMXX] [0] drshop.sma::Hook_Deathmessage (line 443)

wrecked_ 06-07-2010 16:05

Re: Hook_deathmessage
 
What is your declaration for HasHealth[]? Also, please show us your register_event for the DeathMsg.

edgaras85 06-07-2010 16:23

Re: Hook_deathmessage
 
PHP Code:

register_event"DeathMsg""Hook_Deathmessage""a"); 

HasHealth is for that player can buy Health again after death

wrecked_ 06-07-2010 16:28

Re: Hook_deathmessage
 
Your HasHealth variable declaration probably has fewer than 33 cells. You must make it like so:

Code:
new bool:HasHealth[33]

edgaras85 06-07-2010 16:31

Re: Hook_deathmessage
 
I done like this
PHP Code:

new HasHealth64 



All times are GMT -4. The time now is 05:24.

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