Raised This Month: $ Target: $400
 0% 

[REQUEST] Help for Give weapon


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
skabull
Senior Member
Join Date: Mar 2010
Location: Bretagne
Old 04-05-2011 , 17:53   [REQUEST] Help for Give weapon
Reply With Quote #1

Hello,

Could someone give me the code to give all the CT's spawn and a M4 at all Terrorists an AK47.

I try all alone but I can not ...

Code:
public Action:Event_PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
{
    new iSpawnTeam = GetEventInt(event, "spawn");
    
    if (iSpawnTeam == 2)
    {
         GivePlayerItem(client, "weapon_ak47", 0);
    }
    if (iSpawnTeam == 3)
    {
         GivePlayerItem(client, "weapon_m4a1", 0);
    }
}
I started in the coding and I did this by imitation ...
__________________
skabull is offline
Zephyrus
Cool Pig B)
Join Date: Jun 2010
Location: Hungary
Old 04-05-2011 , 22:06   Re: [REQUEST] Help for Give weapon
Reply With Quote #2

Quote:
Originally Posted by skabull View Post
Hello,

Could someone give me the code to give all the CT's spawn and a M4 at all Terrorists an AK47.

I try all alone but I can not ...

Code:
public Action:Event_PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
{
    
new client = GetClientOfUserId(GetEventInt(event, "spawn"));     new iSpawnTeam = GetClientTeam(client);
    
    if (iSpawnTeam == 2)
    {
         GivePlayerItem(client, "weapon_ak47", 0);
    }
    if (iSpawnTeam == 3)
    {
         GivePlayerItem(client, "weapon_m4a1", 0);
    }
}
I started in the coding and I did this by imitation ...
Zephyrus is offline
skabull
Senior Member
Join Date: Mar 2010
Location: Bretagne
Old 04-06-2011 , 13:00   Re: [REQUEST] Help for Give weapon
Reply With Quote #3

I manage to give weapons to the players spawn as the grenade, flashbang, deagle.

But I do not know how to give a different weapon for each team, as a ak47 to Terrorists and CT's to M4.

Can you help me please?
__________________
skabull 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 01:22.


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