Raised This Month: $ Target: $400
 0% 

a little help with a error


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
CipryXXX
Junior Member
Join Date: Apr 2007
Location: Romania
Old 04-11-2007 , 15:14   a little help with a error
Reply With Quote #1

hy all,i am new on this forum and just learning some things . i am tryng to make myselef a plugin that addes extra life,armour,speed,gravity ,but when i try to compile this code i get the next error:
/home/groups/amxmodx/tmp3/php14L84z.sma(21) : error 035: argument type mismatch (argument 2)
here is my code :
Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>

#define PLUGIN "CipryXXX`s Fun plugin"
#define VERSION "1.0"
#define AUTHOR "CipryXXX"


public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    register_clcmd("say /menu","Meniu")
}
public Meniu(id)
{
    new menu
    menu = register_menu ("CipryXXX`s Fun plugin","Meniu2")
    menu_additem(menu,"\wLife - 4000$(addes 150HP)","1",0)
    menu_additem(menu,"\wArmour - 2000$(addes 150 armour)","2",0)
    menu_additem(menu,"\wSpeed - 3000$(addes extra speed)","3",0)
    menu_additem(menu,"\wGravity - 2000$(addes extra gravity)","4",0)    
    menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
    menu_display(id,menu,0)
}
public Meniu2(id,menu,item)
{
    if (item == MENU_EXIT)
    {
        menu_destroy(menu)
        return PLUGIN_HANDLED
    }
    else
    {
        if (!is_user_alive(id))
        {
            client_print(id, print_center, "U are dead and u can not access the menu.")
        }
        else
        {
            new buton[100],nume[100]
            new access, callback
            menu_item_getinfo(menu,item,access,buton,99,nume,99,callback)
            new tasta
            tasta = str_to_num(buton)
            switch (tasta)
            {
                case 1: life(id)
                case 2: armour(id)
                case 3: speed(id)
                case 4: gravity(id)
            }
        }
    }
    menu_destroy(menu)
    return PLUGIN_HANDLED
}
public life(id)
{
    if ( cs_get_user_money(id)<= 4000)
    {
        client_print(id, print_center, "U dont have enough money to buy extra life")
    }
    else
    {
        cs_set_user_money(id,cs_get_user_money(id)-4000)
        set_user_health(id,get_user_health(id)+150)
    }
}
public armour(id)
{
    if ( cs_get_user_money(id)<= 2000)
    {
        client_print(id, print_center, "U dont have enough money to buy extra armour")
    }
    else
    {
        cs_set_user_money(id,cs_get_user_money(id)-2000)
        set_user_armor(id,get_user_armor(id)+150)
    }
}
public speed(id)
{
    if ( cs_get_user_money(id)<= 3000)
    {
        client_print(id, print_center, "U dont have enough money to buy extra speed")
    }
    else
    {
        cs_set_user_money(id,cs_get_user_money(id)-3000)
        set_user_maxspeed(id,0.0)
    }
}
public gravity(id)
{
    if ( cs_get_user_money(id)<= 2000)
    {
        client_print(id, print_center, "U dont have enough money to buy extra gravity")
    }
    else
    {
        cs_set_user_money(id,cs_get_user_money(id)-2000)
        set_user_gravity(id,0.5)
    }
}

Last edited by CipryXXX; 04-12-2007 at 05:47.
CipryXXX is offline
Send a message via Yahoo to CipryXXX
 


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 06:34.


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