Raised This Month: $ Target: $400
 0% 

case 1 and case 2


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lordshiva
BANNED
Join Date: Aug 2009
Location: Heaven
Old 09-27-2009 , 02:53   case 1 and case 2
Reply With Quote #1

switch( get_pdata_int(client, 114) )
{
case 1: fm_give_item(client, "weapon_ak47");
case 2: fm_give_item(client, "weapon_m4a1");
}

Is there any Case like case 0 where I can give same weapon when they spawn
lordshiva is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 09-27-2009 , 08:46   Re: case 1 and case 2
Reply With Quote #2

Quote:
Originally Posted by lordshiva View Post
switch( get_pdata_int(client, 114) )
{
case 1: fm_give_item(client, "weapon_ak47");
case 2: fm_give_item(client, "weapon_m4a1");
}

Is there any Case like case 0 where I can give same weapon when they spawn
Do you understand what is taking place in that switch statement? You are checking what team they are on and giving a weapon accordingly. How would adding a case for 0 give a weapon at spawn?

PHP Code:
RegisterHamHam_Spawn "player" "fwHamSpawn_Post" );

public 
fwHamSpawn_Postid )
{
    if ( 
is_user_aliveid ) )
    {
        
//give spawn weapon
    
}

You said "give same weapon when they spawn", if you want them to get those weapons at spawn:

PHP Code:
public fwHamSpawn_Postid )
{
    if ( 
is_user_aliveid ) )
    {
        switch( 
get_pdata_intid 114 ) )
        {
            case 
1fm_give_itemid "weapon_ak47" );
            case 
2fm_give_itemid "weapon_m4a1" );
        }    
    }

__________________

Last edited by Bugsy; 09-27-2009 at 08:48.
Bugsy is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 09-27-2009 , 09:19   Re: case 1 and case 2
Reply With Quote #3

Use cstrike and fun modules instead of fakemeta :

PHP Code:
public fwHamSpawn_Postid )
{
    if ( 
is_user_aliveid ) )
    {
        switch( 
cs_get_user_team(id) )
        {
            case 
CS_TEAM_Tgive_itemid "weapon_ak47" );
            case 
CS_TEAM_CTgive_itemid "weapon_m4a1" );
        }    
    }

__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 09-27-2009 at 09:22.
ConnorMcLeod is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 09-27-2009 , 09:21   Re: case 1 and case 2
Reply With Quote #4

_give_item hum ?
__________________
xPaw is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 09-27-2009 , 09:22   Re: case 1 and case 2
Reply With Quote #5

Sorry ?
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-27-2009 , 09:50   Re: case 1 and case 2
Reply With Quote #6

Not talking to you, I guess.
__________________
Arkshine is offline
lordshiva
BANNED
Join Date: Aug 2009
Location: Heaven
Old 09-27-2009 , 16:25   Re: case 1 and case 2
Reply With Quote #7

hey 4get past things..Help me if u want...forget all past dude....help meee
lordshiva is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-27-2009 , 16:59   Re: case 1 and case 2
Reply With Quote #8

Quote:
Originally Posted by lordshiva View Post
hey 4get past things..Help me if u want...forget all past dude....help meee
They did help you and I don't see where they said anything about the past.
__________________
fysiks 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 22:37.


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