Raised This Month: $ Target: $400
 0% 

whats wrong here?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
omgitsme
Veteran Member
Join Date: Mar 2010
Old 08-09-2010 , 16:04   whats wrong here?
Reply With Quote #1

yes, i know. it's another stupid vip plugin. but i'm still learning
Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <hamsandwich>
#include <fakemeta>
#include <cstrike>

#define PLUGIN "CSDM Vip"
#define VERSION "1.0"
#define AUTHOR "omgitsme"

public plugin_init() 
{
    register_plugin("CSDM Vip", "1.0", "Omgitsme")
    register_clcmd("say /vipmenu", "VipMenu")
    register_clcmd("say /vip", "ShowMotd")
}

public ShowMotd(id)
{
    show_motd(id, "vip.txt")
}

public VipMenu(id)
{
    {
        if(is_user_alive(id))
        {
            get_user_flags(id, ADMIN_CHAT)
        }
    else
    {
        client_print(1, print_chat, "Jus ne turite vip statusas! Rasyk /vip")
    }    
    new menu = menu_create ("\rVipMenu", "menu_handler");
    menu_additem(menu, "\wAk47 + M4A1 + Deagle", "1", 0);
    menu_additem(menu, "\wGravity", "2", 0);
    menu_additem(menu, "\w200hp + 250ap", "3", 0);
    menu_additem(menu, "\wSpeed", "4", 0);
    menu_additem(menu, "\wPrimary Weapon + Awp", "5", 0);
    menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
    menu_display(id, menu, 0);
}

 public menu_handler(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:
        {
            if(is_user_alive(id))
       strip_user_weapons(id)
       give_item(id, "weapon_knife")
       give_item(id, "weapon_deagle")
            give_item(id, "weapon_ak")
       give_item(id, "weapon_m4a1")
       client_print(1, print_chat, "Tu gavai Ak47 + M4A1 + Deagle")
            menu_destroy(menu)
       return PLUGIN_HANDLED
        }
        case 2:
        {
            if(is_user_alive(id))
        set_pev(id, pev_gravity, 0.5)
        client_print(1, print_chat, "Tavo gravity buvo sumazintas!")
        }
        case 3:
        {
            if(is_user_alive(id))
        set_user_health(id, 200)
        set_user_armor(id, 250)
        client_print(1, print_chat, "Tu gavai 200hp ir 250 armor!")
        }
    case 4:
        {
        if(is_user_alive(id))
        set_user_maxspeed(id, 450);
    }
    case 5:
    {
        if(is_user_alive(id))
        give_item(id, "weapon_awp")
    }
    menu_destroy(menu);
         return PLUGIN_HANDLED;
}
it gives these errors
Quote:
Warning: Loose indentation on line 74, 76, 77, 79, 80, 86, 92
Warning: Tag mismatch on line 98
Error: Only a single statement (or expression) can follow each "case" on line 105
Warning: Expression has no effect on line 105
Warning: Loose indentation on line 106
edit: just put in
Code:
{
        if(is_user_alive(id))
        {
            get_user_flags(id, ADMIN_CHAT)
        }
    else
    {
        client_print(1, print_chat, "Jus ne turite vip statusas! Rasyk /vip")
    }
can someone check if thats allright? thanks.
__________________

Last edited by omgitsme; 08-09-2010 at 16:17.
omgitsme is offline
Send a message via Skype™ to omgitsme
 


Thread Tools
Display Modes

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 22:00.


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