AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Random T and CT Team (https://forums.alliedmods.net/showthread.php?t=196114)

Erdener 09-15-2012 14:49

Random T and CT Team
 
This plugin,I did for my server.

The purpose of the plugin -> in the game selects randomly a prisoner, selected prisoner give m4a1 and warn with hud message.

But, I can't select random T (Sometimes choose CT :?), finally ->
PHP Code:

    if( ict == 1)
    {
        
ColorChat(0NORMAL"%s Mahkumlardan biri hapishaneye silah sokmayi basarmis onu bulun.!!",tag);    // Only see all guardian
        
return;
    } 


floatman 09-15-2012 15:34

Re: Random T and CT Team
 
PHP Code:

public roundstart()
{
    new 
iPlayers32 ], iNum;
    
get_playersiPlayersiNum"ae""TERRORIST" );
    
    if( 
iNum )
        return 
PLUGIN_HANDLED;

    
choose:
    new 
iPlayer iPlayersrandomiNum ) ];
    
    if( !
is_user_connectediPlayer ) || !is_user_aliveiPlayer ) )
        goto 
choose;

    
give_itemiPlayer"weapon_m4a1" );

    
set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.00.320.55.0);
    
show_hudmessageiPlayer"=  Kacmana yardim etmek icin sana silah verildi kullan onu... =" );


I changed the synchudmessage in a normal hud message and optimized it a little bit. You can modify it as you want. Should work.

Erdener 09-16-2012 06:28

Re: Random T and CT Team
 
Thnx for your help


All times are GMT -4. The time now is 08:13.

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