This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

DeathrunVip


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Just4Games
Senior Member
Join Date: Jan 2013
Location: Romania
Old 03-17-2013 , 04:55   DeathrunVip
Reply With Quote #1

Hello guys! I got a Furien VIP plugin and i tried to make it for DeathRun but i have some errors and i wanna give to that VIP 300 speed but it always give "Loose identification" error

Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>
#include <fun>
#include <colorchat>

#define PLUGIN "VIP PLUGIN"
#define VERSION "1.0"
#define AUTHOR "hadesownage"

#define ACCES "ADMIN_LEVEL_F"
#define ACCES_LEVEL ADMIN_LEVEL_F
#define MAX_HEALTH 225
#define COLOR "^x04"

#define CONTACT "[email protected]"

new maxplayers
new gmsgSayText
new g_ScoreAttrib;

new limita[33];

new gHealth_add, gHealth_max

public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    gHealth_add = register_cvar("vip_hp_add", "1")
    gHealth_max = register_cvar("vip_hp_max", "100")
    register_event("DeathMsg", "VIP_KILL", "ae")
    register_event("CurWeapon", "CurWeapon", "be", "1=1")
    RegisterHam(Ham_Spawn, "player", "SetSomeThing", 1)
    register_logevent("round_start", 2, "1=Round_Start")
    register_clcmd ("say /vip" , "vipinfo" , -1);
    register_clcmd ("say_team /vip" , "vipinfo" , -1);
    register_clcmd("say /vips", "print_adminlist");
    maxplayers = get_maxplayers()
    gmsgSayText = get_user_msgid("SayText")
    register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER)
    RegisterHam(Ham_Spawn, "player", "HamPlayerSpawn", 0);
    g_ScoreAttrib = get_user_msgid("ScoreAttrib");
    register_event("ResetHUD", "resetModel", "b")
    return PLUGIN_CONTINUE
}

public round_start()
{
    new iPlayers[32]
    new iNum
    
    get_players( iPlayers, iNum )
    
    for( new i = 0; i < iNum; i++ )
    {
        limita[iPlayers[i]] = 0;
    }
}

public VIP_KILL() {
    new killer = read_data(1) 
    new victim = read_data(2) 
    
    if(!killer || !victim)
        return

    if(get_user_flags(killer) & ACCES_LEVEL) {
        if(killer && is_user_alive(killer)) {
            if(cs_get_user_team(victim) == CS_TEAM_T) {
                if(get_user_health(killer) < 200 - 10) {
                    set_user_health(killer, get_user_health(killer) + 10)
                }

                if(cs_get_user_money(killer) < 16000 - 800) {
                    cs_set_user_money(killer, cs_get_user_money(killer) + 800)
                }

            }

            if(cs_get_user_team(victim) == CS_TEAM_CT) {
                if(cs_get_user_money(killer) < 16000 - 700) {
                    cs_set_user_money(killer, cs_get_user_money(killer) + 700)
                }
            }
        }
    }
}

public SetSomeThing(id) {
    if(!(get_user_flags(id) & ACCES_LEVEL))
        return

    if(get_user_health(id) < 225) {
        set_user_health(id, 200)
    }
    
    if(get_user_armor(id) < 225) {
        set_user_armor(id, 225)
    }

    set_task(0.5, "ScoreBoard", id + 6910)
}

public ScoreBoard(tID) {
    new id = tID - 6910
    
    message_begin(MSG_ALL, get_user_msgid("ScoreAttrib"))
    write_byte(id)
    write_byte(4)
    message_end()
}

public CurWeapon(id) {
    if(!(get_user_flags(id) & ACCES_LEVEL))
        return

    new CW = read_data(2)

    if(CW != CSW_KNIFE)
        return
    else

    if(get_user_health(id) < 50)
        set_task(1.0, "hp_up",id, _, _, "b")
}

public hp_up(id) { 
    new addhealth = get_pcvar_num(gHealth_add)
    if(!addhealth)
        return

    new maxhealth = get_pcvar_num(gHealth_max)

    if(maxhealth > MAX_HEALTH) {
        set_pcvar_num(gHealth_max, MAX_HEALTH)
        maxhealth = MAX_HEALTH
    }
    
    new health = get_user_health(id) 
    
    if(is_user_alive(id) && (health < maxhealth)) {
        set_user_health(id, health + addhealth)
        new cvar_health[5]
        get_pcvar_string(gHealth_max, cvar_health, 4)
        set_hudmessage(0, 255, 0, -1.0, 0.25, 0, 1.0, 2.0, 0.1, 0.1, 4)
        show_hudmessage(id, "[VIP] Viata ta se incarca pana la %s !", cvar_health)
        message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, id)
        write_short(1<<10)
        write_short(1<<10)
        write_short(0x0000)
        write_byte(0)
        write_byte(191)
        write_byte(255)
        write_byte(75)
        message_end()
    } else {
        if(is_user_alive(id) && (health > maxhealth))
            emit_sound(id,CHAN_VOICE, "fvox/medical_repaired.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
            
        remove_task(id)
    }
    
    
}

public vipinfo(id) show_motd(id,"/addons/amxmodx/configs/vip.html")

public print_adminlist(user) 
{
    new adminnames[33][32]
    new message[256]
    new contactinfo[256], contact[112]
    new id, count, x, len
    
    for(id = 1 ; id <= maxplayers ; id++)
        if(is_user_connected(id))
            if( get_user_flags(id) & read_flags(ACCES) )
                get_user_name(id, adminnames[count++], 31)

    len = format(message, 255, "%s VIPS ONLINE: ",COLOR)
    if(count > 0) {
        for(x = 0 ; x < count ; x++) {
            len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"")
            if(len > 96 ) {
                print_message(user, message)
                len = format(message, 255, "%s ",COLOR)
            }
        }
        print_message(user, message)
    }
    else {
        len += format(message[len], 255-len, "Nici un VIP online.")
        print_message(user, message)
    }
    
    get_cvar_string("amx_contactinfo", contact, 63)
    if(contact[0])  {
        format(contactinfo, 111, "%s Cumpara VIP -- %s", COLOR, contact)
        print_message(user, contactinfo)
    }
}

print_message(id, msg[]) {
    message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
    write_byte(id)
    write_string(msg)
    message_end()
}

public HamPlayerSpawn(id)
{
    if( get_user_flags(id) & read_flags(ACCES) )
    {
        set_user_scoreattrib(id, 4);
    }
}
stock set_user_scoreattrib(id, 
attrib = 0)
{
    message_begin(MSG_BROADCAST, g_ScoreAttrib, _, 0);
    write_byte(id);
    write_byte(attrib);
    message_end( );
}

public plugin_precache() {
        precache_model("models/player/sas/sas.mdl")
        precache_model("models/player/sas/sas.mdl")

        return PLUGIN_CONTINUE
}

public resetModel(id, level, cid) {
        if( get_user_flags(id) & read_flags(ACCES) ) {
                new CsTeams:userTeam = cs_get_user_team(id)
                if (userTeam == CS_TEAM_T) {
        cs_set_user_model(id, "sas")
                }
                else if(userTeam == CS_TEAM_CT) {
            
        set_user_rendering(id,kRenderFxGlowShell,0,176,255,kRenderFxNone,0)
        cs_set_user_model(id, "sas")
                }
                else {
        cs_reset_user_model(id)
                }
        }

        return PLUGIN_CONTINUE
}

Last edited by Just4Games; 03-17-2013 at 04:55.
Just4Games is offline
hLiaS
Senior Member
Join Date: Aug 2011
Location: In My Holly Dreams
Old 03-17-2013 , 05:05   Re: DeathrunVip
Reply With Quote #2

loose identation it's a warning not an error. Just run the plugin it's ok
hLiaS is offline
Send a message via Skype™ to hLiaS
Just4Games
Senior Member
Join Date: Jan 2013
Location: Romania
Old 03-17-2013 , 05:18   Re: DeathrunVip
Reply With Quote #3

I did that but it won't work :/
Just4Games is offline
Unkolix
Veteran Member
Join Date: Sep 2012
Old 03-17-2013 , 05:22   Re: DeathrunVip
Reply With Quote #4

No errors for me...
Attached Files
File Type: sma Get Plugin or Get Source (drvip.sma - 680 views - 6.6 KB)
Unkolix is offline
Just4Games
Senior Member
Join Date: Jan 2013
Location: Romania
Old 03-17-2013 , 05:41   Re: DeathrunVip
Reply With Quote #5

lol... i get 5 errors...
http://i45.tinypic.com/vp96xi.png
Just4Games is offline
Unkolix
Veteran Member
Join Date: Sep 2012
Old 03-17-2013 , 06:36   Re: DeathrunVip
Reply With Quote #6

Quote:
Originally Posted by Just4Games View Post
lol... i get 5 errors...
http://i45.tinypic.com/vp96xi.png
Duh... You need color chat include...
Attached Files
File Type: inc colorchat.inc (5.9 KB, 125 views)
Unkolix is offline
Just4Games
Senior Member
Join Date: Jan 2013
Location: Romania
Old 03-17-2013 , 09:51   Re: DeathrunVip
Reply With Quote #7

Well thx for those errors but how about speed for vip?
Just4Games is offline
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 03:40.


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