Raised This Month: $12 Target: $400
 3% 

(css] help i give the defuse kit


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
skabull
Senior Member
Join Date: Mar 2010
Location: Bretagne
Old 04-14-2011 , 15:24   (css] help i give the defuse kit
Reply With Quote #1

Hello,

Could someone help me?

I'd give a kit to defuse the CT's the beginning of each round, but I can not ...

I manage to give the weapons I want, but the kit does not give of the CT's spawn.

That's what I do to give:

Code:
public OnPluginStart()
{
   HookEvent("player_spawn", Event_PlayerSpawn);   
}

public Action:Event_PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
{    
   GivePlayerItem(client, "weapon_hegrenade", 0);      
   GivePlayerItem(client, "item_assaultsuit", 0);

   if (GetClientTeam(client) == CS_TEAM_CT)
       GivePlayerItem(client, "weapon_m4a1");
       GivePlayerItem(client, "item_defuser");
       
   if (GetClientTeam(client) == CS_TEAM_T)
       GivePlayerItem(client, "weapon_ak47");  
       
   return;
}
Please help me
__________________
skabull is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 04-14-2011 , 15:44   Re: (css] help i give the defuse kit
Reply With Quote #2

Post in the SourceMod section. This is for AMXX.
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-14-2011 , 16:06   Re: (css] help i give the defuse kit
Reply With Quote #3

Moved to SourceMod section.
__________________
Arkshine is offline
meng
Veteran Member
Join Date: Oct 2005
Location: us
Old 04-14-2011 , 22:46   Re: (css] help i give the defuse kit
Reply With Quote #4

PHP Code:
public Event_PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
{
    new 
client GetClientOfUserId(GetEventInt(event"userid"));
    new 
clientTeam GetClientTeam(client);

    
GivePlayerItem(client"weapon_hegrenade");
    
GivePlayerItem(client"item_assaultsuit");

    if (
clientTeam == CS_TEAM_CT)
    {
        
GivePlayerItem(client"weapon_m4a1");
        
GivePlayerItem(client"item_defuser");
    }

    else if (
clientTeam == CS_TEAM_T)
        
GivePlayerItem(client"weapon_ak47");  

If you don't want extra guns, grenades & kits laying about, "search" a solution.
__________________
.
[ 1 Dumerils Boa | 1 Cali King ]...
.
I'm a lil' spirituous.
meng is offline
Send a message via Yahoo to meng
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 04-16-2011 , 07:16   Re: (css] help i give the defuse kit
Reply With Quote #5

PHP Code:
SetEntProp(clientProp_Send"m_bHasDefuser"1); 
should do it.
__________________
Peace-Maker is offline
Reply



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 18:20.


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