Raised This Month: $51 Target: $400
 12% 

Ayuda Setear vida :(


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
kendra
Senior Member
Join Date: Feb 2011
Location: Chile
Old 01-10-2013 , 22:36   Ayuda Setear vida :(
#1

bueno hola intente editar este plugin para que al poner /box se activara el friendly fire y que a los usuarios terroristas se les seteara 100 de vida al ponerlo intente usando:

PHP Code:
    new players[32],countiplayer;
    
    
get_players(players,count"ae""T")
    for (
i=0i<counti++) 
        
player players[i
y en los case
PHP Code:
            set_user_health(player100
pero no me funciono aqui el code completo porfavor ayuda(

PHP Code:
public cmd_Box(id
{
    new 
players[32],countiplayer;
    
    
get_players(players,count"ae""T")
    for (
i=0i<counti++) 
        
player players[i]

    
    if(
count 4)
    {
        
ColorChat(idGREEN"[CS.CL] ^1Se necesitan minimo 4 terroristas para activar el box numbero actual: %i"count)
        return 
PLUGIN_HANDLED
    
}
    
    
    
// If the user not connected or not alive
    
if(!is_user_connected(id) || !is_user_alive(id))
        return 
PLUGIN_HANDLED;

    new 
szName[33]
    
get_user_name(idszName32)
    
    
// if the user not are CT
    
if(cs_get_user_team(id) != CS_TEAM_CT
    {
        
// Write That Only CT Can Use That Command
        
ColorChat(idGREEN,"[CS.CL] ^1Solo los guardias pueden ocupar este comando"szName)    
        
        
// End The Code
        
return PLUGIN_HANDLED
    
}
    
    switch(
iHandler
    {
        case 
0: {
            
server_cmd("mp_friendlyfire 1")
            
ColorChat(0GREEN"^4[CS.CL]^1 El Modo ^4Box^1 ha sido Activado por el guardia ^3%s"szName)
            
set_user_health(player100)
        }
        
        case 
1: {
            
server_cmd("mp_friendlyfire 0")
            
ColorChat(0GREEN"^4[CS.CL]^1 El Modo ^4Box^1 ha sido Desactivado por el guardia ^3%s"szName)        
            
set_user_health(player100)
        }
    }
    
    
    
iHandler = !iHandler
    
    
return PLUGIN_HANDLED


Last edited by kendra; 01-11-2013 at 00:56.
kendra is offline
 



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 23:15.


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