AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help if FD random (https://forums.alliedmods.net/showthread.php?t=164473)

shoki123 08-12-2011 03:59

Help if FD random
 
HI I have fd random if ct say /fd its choes freeday to 1 teror.
buy this not work if ct say this ( /fd) It chooses itself
pliz fix this :oops:
PHP Code:

 
#include <amxmodx>
#include <fun>
#include <cstrike>

public plugin_init()
    
register_clcmd("say /fd""CmdFd");
    
public 
CmdFd(id)
{
    if(
cs_get_user_team(id) == CS_TEAM_CT)
    {
        new 
iPlayers[32], iNum;
        
get_players(iPlayersiNum"ae""TERRORIST");
        new 
adname[33]
        
get_user_name(idadname23)
        
set_hudmessage255 , -1.0 0.28 1.1 1.1 0.01 0.01 );
        
show_hudmessage(0"%s You have FreeDay This Round Enjoy!"adname)
    
        
set_user_rendering(iPlayers[random(iNum)], kRenderFxGlowShell25500kRenderTransAlpha150);
    }



drekes 08-12-2011 05:44

Re: Help if FD random
 
PHP Code:

public CmdFd(id)
{
    if(
cs_get_user_team(id) == CS_TEAM_CT)
    {
        new 
iPlayers[32], iNumiPlayer;
        
get_players(iPlayersiNum"ae""TERRORIST");
        
        if(!
iNum)
            return;
        
        
iPlayer iPlayers[random(iNum)];
        
        new 
adname[33]
        
get_user_name(iPlayeradname23)
        
set_hudmessage255 , -1.0 0.28 1.1 1.1 0.01 0.01 );
        
show_hudmessage(0"%s You have FreeDay This Round Enjoy!"adname)
    
        
set_user_rendering(iPlayerkRenderFxGlowShell25500kRenderTransAlpha150);
    }




All times are GMT -4. The time now is 03:20.

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