Raised This Month: $51 Target: $400
 12% 

[REQ] Plugin Help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sanjay Singh
Veteran Member
Join Date: Sep 2016
Old 11-13-2016 , 05:17   [REQ] Plugin Help
Reply With Quote #1

i want a plugin like amx_pika

As we know, normally we use amx_pika "playername" commands

but i want amx_pikamenu command which will show player list in menu and if i select any player command will execute on that player.....


thank you
__________________
Sanjay Singh is offline
Send a message via AIM to Sanjay Singh
Amine Belokda
Senior Member
Join Date: Oct 2015
Location: ML_NOT_FOUND
Old 11-13-2016 , 16:49   Re: [REQ] Plugin Help
Reply With Quote #2

pps:
__________________
Amine Belokda is offline
Send a message via MSN to Amine Belokda
Amine Belokda
Senior Member
Join Date: Oct 2015
Location: ML_NOT_FOUND
Old 11-13-2016 , 16:50   Re: [REQ] Plugin Help
Reply With Quote #3

this is hard plugin contact hard member
__________________
Amine Belokda is offline
Send a message via MSN to Amine Belokda
Artifact
Veteran Member
Join Date: Jul 2010
Old 11-14-2016 , 01:22   Re: [REQ] Plugin Help
Reply With Quote #4

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

public plugin_init()
{
    
register_clcmd"amx_pika""public_Function" );
    
register_clcmd"amx_pikamenu","menu_Function" );
}

public 
public_Functionid )
{
    new 
argv20 ]
    
read_argvidargvcharsmaxargv ) )
    if( !
argv] )
        return 
PLUGIN_HANDLED
    
new target cmd_targetidargv )
    if( !
target )
        return 
PLUGIN_HANDLED
    
new target_name30 ]
    
get_user_nametargettarget_namecharsmaxtarget_name ) )
    
client_printidprint_chat"You use pika function on %s"target_name )
    return 
PLUGIN_HANDLED
}

public 
menu_Functionid )
{
    new 
menu menu_create"\rPika Menu!:""menu_handler" );
    
    new 
players[32], pnumtempid;
    new 
szName[32], szUserId[32];
    
    
get_playersplayerspnum"a" );
    for ( new 
ii<pnumi++ )
    {
        
tempid players[i];
        
        
get_user_nametempidszNamecharsmaxszName ) );
        
formatexszUserIdcharsmaxszUserId ), "%d"get_user_useridtempid ) );
        
menu_additemmenuszNameszUserId);
    }
    
menu_displayidmenu);
}

public 
menu_handleridmenuitem )
{
    if ( 
item == MENU_EXIT )
    {
        
menu_destroymenu );
        return 
PLUGIN_HANDLED;
    }
    
    new 
szData[6], szName[64];
    new 
_accessitem_callback;
    
menu_item_getinfomenuitem_accessszData,charsmaxszData ), szName,charsmaxszName ), item_callback );
    
    new 
userid str_to_numszData );
    new 
player find_player"k"userid );
    
    if ( 
player && is_user_aliveplayer ) )
    {
        new 
name32 ]
        
get_user_nameplayernamecharsmaxname ) )
        
client_printidprint_chat"You selected player %s"name )
    }
    
    
menu_destroymenu );
    return 
PLUGIN_HANDLED;

__________________

Last edited by Artifact; 11-16-2016 at 12:53.
Artifact is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 11-14-2016 , 09:34   Re: [REQ] Plugin Help
Reply With Quote #5

Quote:
Originally Posted by Amine Belokda View Post
this is hard plugin contact hard member
Hard member ftw!
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Sanjay Singh
Veteran Member
Join Date: Sep 2016
Old 11-14-2016 , 13:46   Re: [REQ] Plugin Help
Reply With Quote #6

Plz explain me codes where I have to put command like amx_pika which will execute on player
In short please explain function


Thnx
__________________
Sanjay Singh is offline
Send a message via AIM to Sanjay Singh
Artifact
Veteran Member
Join Date: Jul 2010
Old 11-15-2016 , 01:21   Re: [REQ] Plugin Help
Reply With Quote #7

Code:
public public_Function( id )
This is function that plugin use when you type in console amx_pika <name>

Code:
public menu_handler( id, menu, item )
There you can edit what plugin will do when you choose player ;)
__________________
Artifact is offline
Sanjay Singh
Veteran Member
Join Date: Sep 2016
Old 11-15-2016 , 08:01   Re: [REQ] Plugin Help
Reply With Quote #8

Bro i didnt got you
Please cant u make a code for me? replcing amx_pika with amx_kick "nick" "reason" which will execute on players

thankyou.
__________________
Sanjay Singh is offline
Send a message via AIM to Sanjay Singh
gabuch2
AlliedModders Donor
Join Date: Mar 2011
Location: Chile
Old 11-15-2016 , 08:21   Re: [REQ] Plugin Help
Reply With Quote #9

A quick search of amx_pika on google returning nothing but romanian pages. No way amx_pika is benign.
__________________
gabuch2 is offline
Artifact
Veteran Member
Join Date: Jul 2010
Old 11-15-2016 , 12:32   Re: [REQ] Plugin Help
Reply With Quote #10

You need to say what you want to amx_pika command do. What you want to execute on player... This is just example code
__________________
Artifact 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 17:32.


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