Amxx Plugin menu for fun pratice..
#include <amxmodx>
#include <amxmisc> #include <engine> #include <fun> #include <cstrike> public plugin_init() { register_plugin("AdminCmds","1.0","Maxxim") register_clcmd( "amx_admcmds","ShowMenu", -1, "Shows The menu" ) register_concmd("command","function",ADMIN_SL AY,"comment of the command") register_menucmd(register_menuid("\yAdmin Commands :"), 1023, "MenuCommand" ) return PLUGIN_CONTINUE } public ShowMenu( id ) { new szMenuBody[256] new keys new nLen = format( szMenuBody, 255, "\yAdmin Commands :^n" ) nLen += format( szMenuBody[nLen], 255-nLen, "^n\w1. Invisible" ) nLen += format( szMenuBody[nLen], 255-nLen, "^n\w2. Enleve" ) nLen += format( szMenuBody[nLen], 255-nLen, "^n\w3. Invinsible" ) nLen += format( szMenuBody[nLen], 255-nLen, "^n\w4. Enleve" ) nLen += format( szMenuBody[nLen], 255-nLen, "^n\w5. Vitesse" ) nLen += format( szMenuBody[nLen], 255-nLen, "^n\w6. Enleve" ) nLen += format( szMenuBody[nLen], 255-nLen, "^n\w7. Passe-Murail" ) nLen += format( szMenuBody[nLen], 255-nLen, "^n\w8. Enlever" ) nLen += format( szMenuBody[nLen], 255-nLen, "^n\w - " ) nLen += format( szMenuBody[nLen], 255-nLen, "^n\w9. Suivant" ) nLen += format( szMenuBody[nLen], 255-nLen, "^n^n\w0. Quitter" ) 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 ) { client_print( id, print_console, "[AMX] Key=%d", key ) client_print( id, print_chat, "[AMX] Key=%d", key ) switch( key ) { case 0: { set_user_rendering(id, kRenderFxNone,0,0,0,kRenderTransAlpha,0) client_print( id, print_chat, "[maxxim cmds] :: Vous etes maintenent invisible." ) } case 1: { set_user_rendering(id, kRenderFxNone,255,255,255,kRenderNormal,16) client_print( id, print_chat, "[maxxim cmds] :: Vous n'etes plus invisible." ) } case 2: { set_user_godmode(id) client_print( id, print_chat, "[maxxim cmds] :: Vous etes maintenent invinsible." ) } case 3: { set_user_godmode(id, 0) client_print( id, print_chat, "[maxxim cmds] :: Vous n'etes plus invinsible." ) } case 4: { set_user_maxspeed(id,900) client_print( id, print_chat, "[maxxim cmds] :: Vous etes maintenent super rapide." ) } case 5: { set_user_maxspeed(id,320) client_print( id, print_chat, "[maxxim cmds] :: Vous n'etes plus rapide." ) } case 6: { //passe-murail } case 7: { //enlever passe-murail } case 8: client_print( id, print_chat, "Suivant n'est pas encore valide!" ) case 9: client_print( id, print_chat, "Menu Option EXIT" ) } return PLUGIN_HANDLED } Don't fonction :S Why ?? sorry im french ... i understant english :oops: |
Re: Amxx Plugin menu for fun pratice..
Paste your code with [small] tags so we can read it. ;)
|
Re: Amxx Plugin menu for fun pratice..
I'll do it for him
Code:
|
Re: Amxx Plugin menu for fun pratice..
try this:
Code:
|
Re: Amxx Plugin menu for fun pratice..
Code:
set_user_godmode() is by deafult 0 making the case 2 & 3 having the same effect. change the client_print() on case 2 & 3 ("Vous avez le godmode maintenant" & "Vous n'avez plus le godmode" ? ) for case 6 & 7 Code:
Code:
|
Re: Amxx Plugin menu for fun pratice..
ok thx
|
| All times are GMT -4. The time now is 04:45. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.