Raised This Month: $ Target: $400
 0% 

Need help with cs_get_user_team


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
BloodMan
Senior Member
Join Date: Apr 2008
Location: Lithuania
Old 06-26-2010 , 04:28   Need help with cs_get_user_team
Reply With Quote #1

Theres something fishy with this plugin, even CT's can use it. And it seems that everyone can use it... I would like it to be admins only. They should have ADMIN_LEVEL_H.

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

new bool:FirstSpawn[33]
public plugin_init()
{
    RegisterHam        (Ham_Spawn, "player", "Player_Spawn", 1)
    register_forward( FM_PlayerPreThink, "forward_player_prethink" );
    register_logevent( "logevent_round_start", 2, "1=Round_Start" );

}
public Player_Spawn(id)
{
    if( !is_user_alive(id) &% cs_get_user_team(id) == CS_TEAM_T)

        {
            FirstSpawn[id] = true
            return
        }
    FirstSpawn[id] = false

    new menu = menu_create("Zombiu VIP Meniu:", "vip_menu");

    menu_additem(menu ,"Daugiau Sveikatos", "1" , ADMIN_LEVEL_H);
    menu_additem(menu ,"Greitas Begimas", "2" , ADMIN_LEVEL_H);
    menu_additem(menu ,"Gravitacija", "3" , ADMIN_LEVEL_H);



    menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);

    menu_display(id, menu, 0);
}
public vip_menu(id, menu, item)
{
    if( item == MENU_EXIT )
    {
        menu_destroy(menu);
        return PLUGIN_HANDLED;
    }

    new data[6], iName[64];
    new access, callback;
    menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);


    new key = str_to_num(data);

    switch(key)
    {
case 1:
        {
            fm_set_user_health( id, get_user_health( id ) + 1500 );
            client_print(id, print_chat, "Gavai daugiau Sveikatos, dabar tu stiprus!");
        }
case 2:
        {
            new Float:speed = get_user_maxspeed(id) + 85.0;
            set_user_maxspeed(id , speed);
            client_print(id, print_chat, "Begsi dabar labai greitai!");
        }
case 3:
        {
            fm_set_user_gravity( id, 0.5 );
            client_print(id, print_chat, "O dabar sokinesi kaip kengura!");
        }
    }

    menu_destroy(menu);
    return PLUGIN_HANDLED;
}
__________________

Last edited by BloodMan; 06-26-2010 at 10:41.
BloodMan is offline
Send a message via Skype™ to BloodMan
 



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 14:45.


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