Raised This Month: $ Target: $400
 0% 

[REQ] nVault & Vip - Function problem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Aooka
Veteran Member
Join Date: Aug 2011
Location: Villeurbanne
Old 06-17-2012 , 05:56   [REQ] nVault & Vip - Function problem
Reply With Quote #1

So it's me again

I'm already starting by giving you my code :
Code:
#include < amxmodx > #include < nvault > new g_iSaving; new bool: g_bIsVip[ 33 ]; public plugin_init( ) {     register_plugin( "Vip original" , "1.0" , "Aooka" );     register_concmd( "amx_addvip" , "CmdAddVip" , ADMIN_IMMUNITY , "<#userid>" );     register_concmd( "amx_removevip" , "CmdRemoveVip" , ADMIN_IMMUNITY , "<#userid>" );     register_clcmd( "say /vip" , "VipMenu" );     g_iSaving = nvault_open( "vip_file" );     new iMenu = menu_create( "Awesome Vip Menu" , "Handler_Menu" );     menu_additem( iMenu , "Test 1" , "1" , 0 );     menu_additem( iMenu , "Test 2" , "2" , 0 );     menu_setprop( iMenu , MPROP_EXITNAME , "Sortir" ); } public client_putinserver( id ) {     g_bIsVip[ id ] = false; } public plugin_end( ) {     nvault_close( g_iSaving ); } public VipMenu( id , iMenu ) {     if( is_user_alive( id ) && g_bIsVip[ id ] == true )     {         menu_display( id , iMenu , 0 );     }     else     {         client_print( id , print_center , "If you whant to go to the VipMenu you msut be a Vip" );     } } public Handler_Menu( id , iMenu , item ) {     if( item != MENU_EXIT )     {         switch( item )         {             case 1:                 client_print( id , print_center , "Test 1 :: OK" );             case 2:                 client_print( id , print_center , "Test 2 :: OK" );         }     }     else     {         client_print( id , print_center , "Menu is closed" );         menu_destroy( iMenu );     } } public CmdAddVip( id ) {     new target;         static szName[ 2 ][ 36 ];     get_user_name( id , szName[ 0 ] , charsmax( szName ) );     get_user_name( target , szName[ 1 ] , charsmax( szName ) );         client_print( 0 , print_chat , "%s gave a Vip place for the player %s" , szName[ 0 ] , szName[ 1 ] ); }

I do this about two days ago and today. But (yes but !! ^^ ) i've a big problem with the last function ( public CmdAddVip( id ) )
I do not know the process well :S and Where to start ...

Ps: I've watched how other plugins functioned...

If someone could help me do this function and explaining to me his approach it would be very useful for me


Thank you in advance
__________________
Pawn ? Useless
Aooka is offline
 


Thread Tools
Display Modes

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 06:13.


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