Raised This Month: $ Target: $400
 0% 

Amxx Plugin menu for fun pratice..


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
maxxim
New Member
Join Date: Oct 2006
Old 10-12-2006 , 19:01   Amxx Plugin menu for fun pratice..
Reply With Quote #1

#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
maxxim is offline
commonbullet
Veteran Member
Join Date: Oct 2005
Old 10-12-2006 , 22:10   Re: Amxx Plugin menu for fun pratice..
Reply With Quote #2

Paste your code with [small] tags so we can read it. ;)
commonbullet is offline
Send a message via ICQ to commonbullet Send a message via MSN to commonbullet
stupok
Veteran Member
Join Date: Feb 2006
Old 10-12-2006 , 22:21   Re: Amxx Plugin menu for fun pratice..
Reply With Quote #3

I'll do it for him
Code:
#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 }
stupok is offline
Rolnaaba
Veteran Member
Join Date: May 2006
Old 10-13-2006 , 10:15   Re: Amxx Plugin menu for fun pratice..
Reply With Quote #4

try this:
Code:
#include <amxmodx> #include <amxmisc> #include <engine> #include <fun> #include <cstrike> #define KEYS (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<7)|(1<<8)|(1<<9) // Keys: 1234567890 new g_Menu public plugin_init() {  register_plugin("AdminCmds","1.0","Rolnaaba")  g_Menu = register_menuid("Admin Comands")  register_menucmd(g_Menu, KEYS, "AdminMenu")  register_concmd("amx_admcmds", "ShowMenu", ADMIN_SLAY) } public AdminMenu(id,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 } public ShowMenu(id) {  show_menu(id, KEYS, "^n1. Invisible^n2. Enleve^n3. Invinsible^n4. Enleve^n5. Vitesse^n6. Enleve^n7. Passe-Murail^n8. Enlever^n^n9. Suivant^n0. Quitter^n", -1, "Admin Comands") }
__________________
DO NOT PM me about avp mod.
Rolnaaba is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 10-13-2006 , 20:20   Re: Amxx Plugin menu for fun pratice..
Reply With Quote #5

Code:
set_user_rendering(index, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 0)
0 invisible - 255 visible

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:
set_user_noclip(id, 1) client_print(id, "Vous pouvez maintenant marcher par des murs") // ??

Code:
set_user_noclip(id, 0) client_print(id, "Vous pouvez plus ne marcher par des murs") // ??

Last edited by [ --<-@ ] Black Rose; 10-13-2006 at 20:41.
[ --<-@ ] Black Rose is offline
maxxim
New Member
Join Date: Oct 2006
Old 10-15-2006 , 22:23   Re: Amxx Plugin menu for fun pratice..
Reply With Quote #6

ok thx
maxxim is offline
Reply



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 04:45.


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