Raised This Month: $ Target: $400
 0% 

deagle giver help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Mini_Midget
Veteran Member
Join Date: Jan 2006
Location: It's a mystery.
Old 01-01-2007 , 23:07   Re: deagle giver help
Reply With Quote #2

client_putinserver(id)
is called when a player is connected in the server
You want an event which is called on spawn i believe.
Try this (untested)
PHP Code:
#include <amxmodx>
#include <fun>
#include <engine>
 
public plugin_init()
{
    
register_event("ResetHUD""event_hud_reset""be")
    
register_clcmd("fullupdate""clcmd_fullupdate"
    
register_event("TextMsg""event_restart_attempt""a""2=#Game_will_restart_in")
}

public 
clcmd_fullupdate() {
    return 
PLUGIN_HANDLED
}

public 
event_restart_attempt() {
    new 
players[32], num
    get_players
(playersnum"a")
    for (new 
inum; ++i)
        
g_restart_attempt[players[i]] = true
}

public 
event_hud_reset(id) {
    if (
g_restart_attempt[id]) {
        
g_restart_attempt[id] = false
        
return
    }

    
event_player_spawn(id)
}

// this function is called on player spawn
public event_player_spawn(id) {
    
give_item(0,"weapon_deagle")

Read this if you still having problems
http://forums.alliedmods.net/showthread.php?t=42159
__________________
It's a mystery.
Mini_Midget is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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