AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   What am i doing wrong here? (https://forums.alliedmods.net/showthread.php?t=184591)

Bilal Pro 05-06-2012 15:41

What am i doing wrong here?
 
Hooked this:
PHP Code:

RegisterHam(Ham_Touch"grenade""fw_touch"

functions
PHP Code:

public fw_touch(id)
{
    if (
is_user_alive(id))
    {
        
set_task(0.1"Kill"id)
    }
}

public 
Kill(id)
{
    
user_silentkill(id)



Xalus 05-06-2012 16:04

Re: What am i doing wrong here?
 
PHP Code:


#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>

#define PLUGIN "Touch -_-"
#define VERSION "1.0"
#define AUTHOR "Xalus"

new iMaxPlayers

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
// Register: Ham
    
RegisterHam(Ham_Touch"player""Ham_PlayerTouch")
    
    
// Others
    
iMaxPlayers get_maxplayers()
}
public 
Ham_PlayerTouch(identity) {
    if(
is_user_alive(id) && pev_valid(entity)
    && 
entity iMaxPlayers) {
        
// Check classname of entity
        
    
}




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

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