AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Index out of bounds in FM Think [SOLVED!] (https://forums.alliedmods.net/showthread.php?t=85199)

anakin_cstrike 02-07-2009 06:54

Index out of bounds in FM Think [SOLVED!]
 
Solved, thanks.

hleV 02-07-2009 06:56

Re: Index out of bounds in FM Think
 
Did you check if player is connected or alive?

Arkshine 02-07-2009 07:07

Re: Index out of bounds in FM Think
 
Connected or alive should not be necessary but to check if id is > 0 and <= maxClients should be done.

ConnorMcLeod 02-07-2009 07:18

Re: Index out of bounds in FM Think
 
Instead, you can use playerprethink

anakin_cstrike 02-07-2009 07:21

Re: Index out of bounds in FM Think
 
Quote:

Originally Posted by ConnorMcLeod (Post 757286)
Instead, you can use playerprethink

Yea, i know ;p

@ hleV: yeah, that was the problem
@ arkshine: i works that way, thanks

ConnorMcLeod 02-07-2009 07:22

Re: Index out of bounds in FM Think [SOLVED!]
 
Why all those stupid people always delete their 1st post when their problem are solved ?

Would be simpler to do :
PHP Code:

#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

#define PLUGIN "Custom DecalFrequency"
#define AUTHOR "ConnorMcLeod"
#define VERSION "0.0.1"

#define    m_flNextDecalTime    486

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)

    
RegisterHam(Ham_Player_ImpulseCommands"player""Player_Impulse"1)
}

public 
Player_Impulseid )
{
    if( 
pev(idpev_impulse) == 201 )
    {
        
set_pdata_int(idm_flNextDecalTimeget_gametime() + VALUE_YOU_WANT)
    }



anakin_cstrike 02-07-2009 07:25

Re: Index out of bounds in FM Think [SOLVED!]
 
I think is the first time when i'm editing the first post after solving something.

And thanks for that script.

ConnorMcLeod 02-07-2009 07:31

Re: Index out of bounds in FM Think [SOLVED!]
 
Quote:

Originally Posted by anakin_cstrike (Post 757291)
I think is the first time

And last ? :mrgreen:

anakin_cstrike 02-07-2009 07:35

Re: Index out of bounds in FM Think [SOLVED!]
 
Quote:

Originally Posted by ConnorMcLeod (Post 757294)
And last ? :mrgreen:

Maybe ^^

EDIT: Should be set_pdata_float

ConnorMcLeod 02-07-2009 10:46

Re: Index out of bounds in FM Think [SOLVED!]
 
Quote:

Originally Posted by anakin_cstrike (Post 757296)
Should be set_pdata_float

Yes, but i gonna delete my post so yours gonna loose any sense :mrgreen:


All times are GMT -4. The time now is 17:04.

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