Raised This Month: $ Target: $400
 0% 

Help Code


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wTf.
Senior Member
Join Date: Aug 2011
Location: This important?
Old 08-24-2012 , 09:55   Help Code
Reply With Quote #1

PHP Code:
public yenitur()
{
    new 
oyuncusayisi get_playersnum(0);
    if (
oyuncusayisi get_pcvar_num(g_enazoyuncusayisi)) return
    
    new 
Players[32], iCountrasgele
    get_players
(Players,iCount,"e","TERRORIST")
    if(
iCount 0)
    {
        
rasgele Playersrandom_num(0iCount) ]
        
client_cmd(rasgele,"cadiol")
        new 
terrname[64]
        
get_user_name(rasgeleterrname63)
        
set_hudmessage(2552552550.030.6006.05.0,_,_,21)
        
show_hudmessage(0"Bu Elin TE Cadisi :^n%s",terrname)
    }


Here not work. Where is the problem?

EDIT:

PHP Code:
public cadiol(id)
{
    if(
sadecebicak[id] == 0){
        
        
        
reset_value_player(id)
        
        if(
is_user_bot(id))
        {
            
set_task(random_float(5.0,15.0), "bot_use_skill"id+TASK_BOT_USE_SKILL)
            return
        }
        
sadecebicak[id]     = 1
        strip_user_weapons
(id)
        
give_item(id"weapon_knife")
        
engclient_cmdid"weapon_knife" );
        
set_pev(idpev_health,5000.0)
        
set_pev(idpev_viewmodel2,  "models/zombie_plague/v_knife_witch_zombi.mdl"
        
set_pev(idpev_weaponmodel2"")
        if (
get_user_team(id) == ) {
            
cs_set_user_model(id"cadimodelite")
        }
        else {
            
cs_set_user_model(id"cadimodelict")
        }
        
zp_colored_print(id"^x04[CSM]^x01 Cadi Oldun.^x04 Yarasa Firlatma^x01 Özelligin Var.^x04 %.1f ^x01saniyede bir ^x04G ^x01tusuna basarak firlatabilirsin."bat_timewait)
        
    }
    
    if(
sadecebicak[id] == 1){
        
zp_colored_print(id"^x04[CSM]^x01 Sen Zaten Cadisin!")
    }


Last edited by wTf.; 08-24-2012 at 10:40.
wTf. is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 08-24-2012 , 10:06   Re: Help Code
Reply With Quote #2

What are you trying to do?
Slowhacking is not allowed.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
wTf.
Senior Member
Join Date: Aug 2011
Location: This important?
Old 08-24-2012 , 10:15   Re: Help Code
Reply With Quote #3

Shows the name of the player.
But, after selecting the random name sometimes server name writes.

and the player randomly selected can't work it client_cmd.

Last edited by wTf.; 08-24-2012 at 10:32.
wTf. is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 08-24-2012 , 10:46   Re: Help Code
Reply With Quote #4

PHP Code:
new iPlayersCountInServer get_playersnum); // Players which are connected will be counted
new iPlayersCountInServer get_playersnum); // Same with first + counting connecting players too

new iPlayers32 ] = { 0, ... }, iCount 0;
get_playersiPlayersiCount );

if( 
iCount ) {
  new 
iRandom random_num0iCount );
  new 
iPlayer iPlayersiRandom ];

  new 
cName32 ];
  
get_user_nameiPlayercName31 );


Last edited by claudiuhks; 08-24-2012 at 10:47.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
wTf.
Senior Member
Join Date: Aug 2011
Location: This important?
Old 08-24-2012 , 11:02   Re: Help Code
Reply With Quote #5

EDIT:

code work. But
Quote:
Originally Posted by wTf. View Post
the player randomly selected can't work it client_cmd.

Last edited by wTf.; 08-24-2012 at 11:16.
wTf. is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 08-24-2012 , 12:15   Re: Help Code
Reply With Quote #6

what does the command "cadiol" do? You may be sending it improperly....
__________________
What an elegant solution to a problem that doesn't need solving....
Liverwiz is offline
Old 08-24-2012, 14:51
wTf.
This message has been deleted by wTf..
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 05:45.


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