AlliedModders

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

whosyourdaddy 08-01-2010 18:26

bomb_defused function
 
for some reason my bomb_defused and my bomb_exploded functions arent working this is what i have set in my sma

Code:

#include <csx>

// Called when a user defuses the bomb
public bomb_defused( defuser )
{
        client_print( 0, print_chat, "Bomb defused" )
}

// Called when bomb explodes
public bomb_explode( planter )
{
        client_print( 0, print_chat, "Bomb exploded" )
}

of course i have my plugin_init() and other things but for some reason these 2 functions seem to not be working

matsi 08-01-2010 18:45

Re: bomb_defused function
 
I don't know if this is any help to you but take a look:
http://forums.alliedmods.net/showthread.php?t=40164

Gadzislaw007 08-01-2010 19:14

Re: bomb_defused function
 
PHP Code:

#include <fakemeta>


public plugin_init()
{
    
    
register_logevent("logevent_function_p"3"2=Defused_The_Bomb")
    
register_event("23""event_bomb_explode""a""1=17""6=-105""7=17")
    
}
// Called when a user defuses the bomb
public event_bomb_defuseddefuser )
{
    
client_print0print_chat"Bomb defused" )
}

// Called when bomb explodes
public event_bomb_explodeplanter )
{
    
client_print0print_chat"Bomb exploded" )


I've just used the link, what've matsi sent. Next time you could search for something like this.

whosyourdaddy 08-01-2010 19:52

Re: bomb_defused function
 
actually thats now how u do it gadzis but what matsi linked did help and i did search btw

RedRobster 08-01-2010 20:54

Re: bomb_defused function
 
Yeah, but I know where you got what you were thinking about:
http://www.amxmodx.org/funcwiki.php?...bomb&go=search

To use that, you have to include <csx> in your plugin.

Edit: Which you said you did...so I don't know.

ConnorMcLeod 08-02-2010 05:25

Re: bomb_defused function
 
Check if csx is actually loaded by typing 'amxx modules' in server console.


@Gadzislaw007
You don't really answer to 1st post, you only give an alternative.
Also, your callbacks don't match to declarations in plugin_init, and also, with a logevent you can't retrieve a player id just passing an index in the callback, read again VEN's thread.


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

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