Raised This Month: $ Target: $400
 0% 

port my mod from amx to amxx so i can learn a lil.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
maariak
Junior Member
Join Date: Dec 2004
Old 04-11-2005 , 20:01   port my mod from amx to amxx so i can learn a lil.
Reply With Quote #1

can any1 port this to amxx from amx? i need to learn some amxx coding as i know amx already.

Code:
#include <amxmod> #include <amxmisc> #include <VexdUM> new bool:is_enemy[33] public plugin_init() { register_plugin("Fun Mod","v1.0","Lil' P!mP") register_cvar("fm_enemytime","60") register_clcmd( "say funmenu","ShowMenu", -1, "Shows The menu" ) register_clcmd( "say_team funmenu","ShowMenu", -1, "Shows The menu" ) register_clcmd( "say_team /funmenu","ShowMenu", -1, "Shows The menu" ) register_clcmd( "say /funmenu","ShowMenu", -1, "Shows The menu" ) register_event("ResetHUD", "ShowMenu", "b") register_clcmd( "say /funmenu2","ShowMenu2", -2, "Shows The menu2" ) register_menucmd(register_menuid("\yFun Menu"), (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<7|1<<8|1<<9), "MenuCommand" ) return PLUGIN_CONTINUE } public ShowMenu(id) { new szMenuBody[256] new keys new nLen = format(szMenuBody, 255, "\yFun Menu^n" ) nLen += format(szMenuBody[nLen], 255-nLen, "^n\w1. Invisibility - $10000" ) nLen += format(szMenuBody[nLen], 255-nLen, "^n\w2. Gravity 200 - $2000" ) nLen += format(szMenuBody[nLen], 255-nLen, "^n\w3. Gravity 800 - $2000" ) nLen += format(szMenuBody[nLen], 255-nLen, "^n\w4. Give me 500 hp - $8000" ) nLen += format(szMenuBody[nLen], 255-nLen, "^n\w5. Make me glow - $1000" ) nLen += format(szMenuBody[nLen], 255-nLen, "^n\w6. Buy Awp - $16000" ) nLen += format(szMenuBody[nLen], 255-nLen, "^n\w7. Buy g3sg1 - $16000" ) nLen += format(szMenuBody[nLen], 255-nLen, "^n\w8. Enemy look - $16000" ) nLen += format(szMenuBody[nLen], 255-nLen, "^n\w9. Buy NoClip - $13000" ) nLen += format(szMenuBody[nLen], 255-nLen, "^n^n\w0. Exit" ) keys = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<7|1<<8|1<<9)     show_menu( id, keys, szMenuBody, -1 ) return PLUGIN_CONTINUE } public MenuCommand(id, key) { switch( key )       { case 0: { new money=get_user_money(id) if(money<=9999){ client_print(id, print_chat, "[FUN MOD] You need 10000 to get invisibility") return PLUGIN_HANDLED } else{ new name[32], get_user_name(id,name,31) set_user_rendering(id,kRenderFxGlowShell, 0,0,0, kRenderTransAlpha,0) set_user_money(id, money-10000) client_print(id, print_chat, "[FUN MOD] You bought invisibility and you are now invisible for this round.") set_hudmessage(200, 50, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1) show_hudmessage(0,"%s bought invsibility! You better run for your life!", name) engclient_cmd(id,"drop",wname) engclient_cmd(id,"weapon_knife") } } case 1: { new money=get_user_money(id) if(money<=1999){ client_print(id, print_chat, "[FUN MOD] You need 2000 to have your gravity set to 200") return PLUGIN_HANDLED } else{ set_user_gravity(id, 0.25) set_user_money(id, money-2000) client_print(id, print_chat, "[FUN MOD] Your gravity is now 200 for this round") } } case 2: { new money=get_user_money(id) if(money<=1999){ client_print(id, print_chat, "[FUN MOD] You need 2000 to have your gravity set to 800") return PLUGIN_HANDLED } else{ set_user_gravity(id, 0.0) set_user_money(id, money-2000) client_print(id, print_chat, "[FUN MOD] Your gravity is now 800") } } case 3: { new money=get_user_money(id) if(money<=7999){ client_print(id, print_chat, "[FUN MOD] You need 8000 to have your health rise 500") return PLUGIN_HANDLED     } else{     set_user_health(id, 500)     set_user_money(id, money-8000)     client_print(id, print_chat, "[FUN MOD] You bought 500 health for this round only")     }     }     case 4:   { new money=get_user_money(id) if(money<=999){ client_print(id, print_chat, "[FUN MOD] You need 1000 to glow") return PLUGIN_HANDLED     } else{     set_user_money(id, money-1000)   set_user_rendering(id,kRenderFxGlowShell, 0,255,0, kRenderNormal,16)     client_print(id, print_chat, "[FUN MOD] You bought glow for this round only")     }     }   case 5:   { new money=get_user_money(id) if(money<=15999){ client_print(id, print_chat, "[FUN MOD] You need 16000 to buy AWP") return PLUGIN_HANDLED   } else{ give_item(id,"weapon_awp") give_item(id,"ammo_338magnum") give_item(id,"ammo_338magnum") give_item(id,"ammo_338magnum")     set_user_money(id, money-16000)     client_print(id, print_chat, "[FUN MOD] You bought AWP and you will have it until you die")     } } case 6: { new money=get_user_money(id) if(money<=15999){ client_print(id, print_chat, "[FUN MOD] You need 16000 to buy g3sg1") return PLUGIN_HANDLED } else{ give_item(id,"weapon_g3sg1") give_item(id,"ammo_762nato") give_item(id,"ammo_762nato") give_item(id,"ammo_762nato") set_user_money(id, money-16000) client_print(id, print_chat, "[FUN MOD] You bought g3sg1 and you will have it until you die") } } case 7: { new money=get_user_money(id) if(money<=15999){ client_print(id, print_chat, "[FUN MOD] You need 16000 to look like enemy") return PLUGIN_HANDLED } else{ new Float:enemy_time = get_cvar_float("mp_enemytime") new enemytime = get_cvar_num("mp_enemytime") new enemy_id[3] num_to_str(id,enemy_id,2) { if (get_user_team(id)==1) { CS_SetModel(id, "sas") } else { CS_SetModel(id, "arctic") } } is_enemy[id]=true set_task(enemy_time,"unenemy",1000+id,enemy_id,2) set_user_money(id, money-16000) client_print(id, print_chat, "[FUN MOD] You now look like enemy for %d seconds",enemytime) } } case 8: { new money=get_user_money(id) if(money<=12999){ client_print(id, print_chat, "[FUN MOD] You need 13000 to buy NoClip") return PLUGIN_HANDLED } else{ set_user_noclip(id, 1) set_user_money(id, money-13000) client_print(id, print_chat, "[FUN MOD] You bought NoClip for this round only") } }     case 9: client_print(id, print_console, "[FUN MOD] You exited the menu" )       } return PLUGIN_HANDLED } public unenemy(enemy_id[]) { new id = str_to_num(enemy_id) CS_ClearModel(id) client_print(id, print_chat, "[FUN MOD] You look like you should now") is_enemy[id]=false }
maariak 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 16:39.


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