Raised This Month: $ Target: $400
 0% 

DeathRun VIP


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
CaTaLinU
Junior Member
Join Date: Jun 2011
Old 06-21-2011 , 16:39   DeathRun VIP
Reply With Quote #1

I have a deathrun VIP
i have made it to give 300 HP , HE , and Smoke for the admins who have flags "abegi"
but in cant make it that VIP to have gravity 400 or 350
am to have some speed, normal its 250 but i want that VIP to have 300 or 320

The code of the .sma is here


PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <fakemeta_util>
#include <hamsandwich>
#include <cstrike>
#include <amxmisc>
#include <fun>

#define PLUGIN_NAME "Deathrun VIP"
#define PLUGIN_AUTHOR "..."
#define PLUGIN_VERSION "0.1"

static const COLOR[] = "^x04"
static const CONTACT[] = ""

new maxplayers
new gmsgSayText

public plugin_init()
{
register_plugin(PLUGIN_NAMEPLUGIN_AUTHORPLUGIN_VERSION);

register_event("ResetHUD","event_reset_hud","be");
register_event("ResetHUD""resetModel""b")
register_clcmd("say /vip","admin_motd",0,"- Shows the MOTD.")

register_clcmd("say""handle_say")
register_cvar("amx_contactinfo"CONTACTFCVAR_SERVER)
gmsgSayText get_user_msgid("SayText")

maxplayers get_maxplayers()

return 
PLUGIN_CONTINUE

}



public 
resetModel(idlevelcid) {
if (
get_user_flags(id) & ADMIN_CVAR) {
new 
CsTeams:userTeam cs_get_user_team(id)
if (
userTeam == CS_TEAM_T) {
cs_set_user_model(id"smith")
}
else if(
userTeam == CS_TEAM_CT) {
cs_set_user_model(id"smith")
}
else {
cs_reset_user_model(id)
}
}

return 
PLUGIN_CONTINUE
}


public 
event_reset_hud(id)
{
if(!
is_user_connected(id))
return 
PLUGIN_CONTINUE;

client_print(idprint_chat"[VIP] scrie /vip ca sa vezi ce privilegii poti avea.")

if(!
access(id,ADMIN_CVAR))
return 
PLUGIN_CONTINUE;

set_task(1.0,"give_stuff",id);

return 
PLUGIN_CONTINUE;
}

public 
admin_motd(id,level,cid) {

    if (!
cmd_access(id,level,cid,1))
    return 
PLUGIN_CONTINUE
    
    show_motd
(id,"vip.txt","DeathRun VIP")
    return 
PLUGIN_CONTINUE   
}




public 
give_stuff(id)
{
if(!
is_user_connected(id))
return;

   
fm_give_item(id"item_assaultsuit");
   
fm_give_item(id"weapon_hegrenade");
   
fm_give_item(id"weapon_smokegrenade");
   
cs_set_user_money(idcs_get_user_money(id) + 5000); 
   
set_user_gravity(id0.25);
   
get_user_maxspeed(id);
   
set_user_maxspeed(id350)
    
get_user_health(id);
    
set_user_health(id300);
}

public 
handle_say(id)
{
    new 
said[192]
    
read_args(said,192)
    if(( 
containi(said"who") != -&& containi(said"admin") != -1) || contain(said"/vips") != -1)
        
set_task(0.1,"print_viplist"id)
    return 
PLUGIN_CONTINUE
}

public 
print_viplist(user
{
    new 
adminnames[33][32]
    new 
message[256]
    new 
contactinfo[256], contact[112]
    new 
idcountxlen
    
    
for(id id <= maxplayers id++)
        if(
is_user_connected(id))
            if(
get_user_flags(id) & ADMIN_CVAR)
                
get_user_name(idadminnames[count++], 31)

    
len format(message255"%s Online VIP: ",COLOR)
    if(
count 0) {
        for(
count x++) {
            
len += format(message[len], 255-len"%s%s "adminnames[x], < (count-1) ? ", ":"")
            if(
len 96 ) {
                
print_message(usermessage)
                
len format(message255"%s ",COLOR)
            }
        }
        
print_message(usermessage)
    }
    else {
        
len += format(message[len], 255-len"No online VIP.")
        
print_message(usermessage)
    }

    
get_cvar_string("amx_contactinfo"contact63)
    if(
contact[0])  {
        
format(contactinfo111"%s Contact Server Admin -- %s"COLORcontact)
        
print_message(usercontactinfo)
    }
}

print_message(idmsg[])
{
    
message_begin(MSG_ONEgmsgSayText, {0,0,0}, id)
    
write_byte(id)
    
write_string(msg)
    
message_end()

CaTaLinU 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:29.


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