Raised This Month: $ Target: $400
 0% 

help finalize the plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Trickzz
Member
Join Date: Jun 2011
Old 07-09-2012 , 20:43   help finalize the plugin
Reply With Quote #1

Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>

#define PLUGIN "Chance"
#define VERSION "1.0"
#define AUTHOR "Trickz"

#define TAG "[Chance]"

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
}

public My_Menu(id)
{
    new i_Menu = menu_create("\Hi, want to try your luck?", "menu_handler")

    menu_additem(i_Menu, "\wAll Nades", "1", 0)
    menu_additem(i_Menu, "\wGravity", "2", 0)
    menu_additem(i_Menu, "\wSpeed", "3", 0)
    menu_additem(i_Menu, "\wMoney", "4", 0)
    
    menu_additem(i_Menu, "\wTry Chance", "6", 0)
    menu_additem(i_Menu, "\wNext Time", "7", 0)

    set_task(15.0 "menu_display")
}

public chance (id)
{
         new rand = random_num(0,100) 
         if(random_num(1,2,3,4,5,6) <= 10)
              switch(rand) 
    {
    case 1:
    {
        client_print(id,print_chat,"You got all the Nades")
             give_item( 0, weapon_hegrenade );
             give_item( 0, weapon_flashbang );
             give_item( 0, weapon_smokegrenade );
    }
    case 2:
    {
        client_print(id,print_chat,"Your Speed:270 (def: 240)")
             set_user_maxspeed( id, 270 );
    }
    case 3:
    {
        client_print(id,print_chat,"Your Gravity:760 (def: 800:")
             set_user_gravity( id, = 0.95 );
    }
    case 4:
    {
        client_print(id,print_chat,"You've got 10.000$")
             set_user_money( id, 1000, 1 ); 
    }
    case 5:
    {
        client_print(id,print_chat,"EpicFail: You die... :(")
             user_kill ( 0,[0] );
    }

    menu_destroy(menu)
    return PLUGIN_HANDLED
}
Please help finalize the plugin, deleted accidentally is now trying to recover the rest of the code

Compiling:
Quote:
//AMXXPC compile.exe
// by the AMX Mod X Dev Team


//// Chance.sma
// E:\CS [HOST]\HLDS 5408 [48]\cstrike\addons\amxmodx\scripting\Chance.sma( 2 :
error 001: expected token: ",", but found "-string-"
// E:\CS [HOST]\HLDS 5408 [48]\cstrike\addons\amxmodx\scripting\Chance.sma( 2 :
warning 215: expression has no effect
// E:\CS [HOST]\HLDS 5408 [48]\cstrike\addons\amxmodx\scripting\Chance.sma( 2 :
error 001: expected token: ";", but found ")"
// E:\CS [HOST]\HLDS 5408 [48]\cstrike\addons\amxmodx\scripting\Chance.sma( 2 :
error 029: invalid expression, assumed zero
// E:\CS [HOST]\HLDS 5408 [48]\cstrike\addons\amxmodx\scripting\Chance.sma( 2 :
fatal error 107: too many error messages on one line
//
// Compilation aborted.
// 4 Errors.
// Could not locate output file E:\CS [HOST]\HLDS 5408 [48]\cstrike\addons\amxmo
dx\scripting\compiled\Chance.amx (compile failed).
//
// Compilation Time: 0,22 sec
// ----------------------------------------

Press enter to exit ...

Last edited by Trickzz; 07-09-2012 at 20:44.
Trickzz 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 15:06.


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