Raised This Month: $ Target: $400
 0% 

help finalize the plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Trickzz
Member
Join Date: Jun 2011
Old 07-12-2012 , 06:32   Re: help finalize the plugin
Reply With Quote #6

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

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

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd"say /cc","My_Menu");
}

public 
My_Menu(id)
{
    new 
i_Menu menu_create("\rHi, 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"\wSuicide""5"0)
    
    
menu_additem(i_Menu"\wTry Chance""6"0)
    
menu_additem(i_Menu"\wNext Time""7"0)

    
menu_display(idi_Menu0);
}

public 
menu_handler(idi_Menuitem)
{
    new 
data[6], szName[64];
    new 
accesscallback;
    
menu_item_getinfo(i_Menuitemaccessdata,charsmax(data), szName,charsmax(szName), callback);
    
    new 
key str_to_num(data);
    
         new 
rand random_num(0,100
         if(
random_num(1,2,3,4,5) <= 10)
              switch(
rand
    {
    case 
1..10// 10%
    
{
        
client_print(id,print_chat,"You got all the Nades")
             
give_itemid"weapon_hegrenade" );
             
give_itemid"weapon_flashbang" );
             
give_itemid"weapon_smokegrenade" ); 
    }
    case 
11..20// 10%
    
{
        
client_print(id,print_chat,"Your Speed:270 (def: 240)")
             
set_user_gravityid0.95 );
    }
    case 
21..30// 10%
    
{
        
client_print(id,print_chat,"Your Gravity:760 (def: 800:")
             
set_user_maxspeed (id270);
    }
    case 
31..40// 10%
    
{
        
client_print(id,print_chat,"You've got 10.000$")
             
cs_set_user_moneyid10000);  
    }
    case 
41..100 // 60%
    
{
        
client_print(id,print_chat,"EpicFail: You die... :(")
             
user_kill id);  
    }

    
menu_destroy(i_Menu)
    return 
PLUGIN_HANDLED

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


//// copy.sma
// E:\CS [HOST]\HLDS 5408 [48]\cstrike\addons\amxmodx\scripting\copy.sma(13 ) : w
arning 217: loose indentation
// E:\CS [HOST]\HLDS 5408 [48]\cstrike\addons\amxmodx\scripting\copy.sma(24 ) : w
arning 217: loose indentation
// E:\CS [HOST]\HLDS 5408 [48]\cstrike\addons\amxmodx\scripting\copy.sma(26 ) : w
arning 217: loose indentation
// E:\CS [HOST]\HLDS 5408 [48]\cstrike\addons\amxmodx\scripting\copy.sma(35 ) : w
arning 217: loose indentation
// E:\CS [HOST]\HLDS 5408 [48]\cstrike\addons\amxmodx\scripting\copy.sma(36 ) : w
arning 217: loose indentation
// E:\CS [HOST]\HLDS 5408 [48]\cstrike\addons\amxmodx\scripting\copy.sma(40 ) : w
arning 217: loose indentation
// E:\CS [HOST]\HLDS 5408 [48]\cstrike\addons\amxmodx\scripting\copy.sma(41 ) : e
rror 088: number of arguments does not match definition
// E:\CS [HOST]\HLDS 5408 [48]\cstrike\addons\amxmodx\scripting\copy.sma(47 ) : w
arning 217: loose indentation
// E:\CS [HOST]\HLDS 5408 [48]\cstrike\addons\amxmodx\scripting\copy.sma(54 ) : w
arning 217: loose indentation
// E:\CS [HOST]\HLDS 5408 [48]\cstrike\addons\amxmodx\scripting\copy.sma(59 ) : w
arning 217: loose indentation
// E:\CS [HOST]\HLDS 5408 [48]\cstrike\addons\amxmodx\scripting\copy.sma(59 ) : w
arning 213: tag mismatch
// E:\CS [HOST]\HLDS 5408 [48]\cstrike\addons\amxmodx\scripting\copy.sma(64 ) : w
arning 217: loose indentation
// E:\CS [HOST]\HLDS 5408 [48]\cstrike\addons\amxmodx\scripting\copy.sma(66 -- 6
7) : error 029: invalid expression, assumed zero
// E:\CS [HOST]\HLDS 5408 [48]\cstrike\addons\amxmodx\scripting\copy.sma(69 ) : w
arning 217: loose indentation
// E:\CS [HOST]\HLDS 5408 [48]\cstrike\addons\amxmodx\scripting\copy.sma(72 ) : e
rror 002: only a single statement (or expression) can follow each "case"
// E:\CS [HOST]\HLDS 5408 [48]\cstrike\addons\amxmodx\scripting\copy.sma(72 -- 7
3) : warning 215: expression has no effect
// E:\CS [HOST]\HLDS 5408 [48]\cstrike\addons\amxmodx\scripting\copy.sma(74 ) : w
arning 204: symbol is assigned a value that is never used: "key"
//
// 3 Errors.
// Could not locate output file E:\CS [HOST]\HLDS 5408 [48]\cstrike\addons\amxmo
dx\scripting\compiled\copy.amx (compile failed).
//
// Compilation Time: 0,19 sec
// ----------------------------------------

Press enter to exit ...
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