Raised This Month: $ Target: $400
 0% 

Correct Way To Show Menu/Msg To Owner & Target?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 05-07-2013 , 05:48   Correct Way To Show Menu/Msg To Owner & Target?
Reply With Quote #1

Code:
    new Title[ 101 ], szName[ 32 ]; get_user_name( id, szName, 31 );     formatex( Title, 100, "Do You Accept ( \r%s\y ) Donation From \r%s\y", Desc, szName );     new menu = menu_create( Title, "Donate_Handler" );         menu_additem( menu, "I Accept The Donation", "1", 0 );     menu_additem( menu, "I Dont Accept", "2", 0 );         menu_display( g_iDonTarget, menu, 0 );     return PLUGIN_HANDLED; } public Donate_Handler( id, menu, item ) {     new szName[ 32 ]; get_user_name( g_iDonTarget, szName, 31 );     if( item == MENU_EXIT )     {         Color( id, "%s !t%s!n Declined Your !gDonation!n",PREFIX, szName );         menu_destroy( menu );         return PLUGIN_HANDLED;     }

this is spose to show menu to Target, if Target Declined or exits menu its spose to then show msg to Doner that they declined the Donation.

is this the correct way... i test on my lan server and only with me and it works... but since im same person it would work.. i would like to know if this would work the way i want it to ?

this is for my rewrite of my latest plugin.
__________________
Blizzard_87 is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 05-07-2013 , 07:52   Re: Correct Way To Show Menu/Msg To Owner & Target?
Reply With Quote #2

This doesn't make any sense. Your sending the donation message to the player who sees the menu. You also send the 3rd and 4th parameters of menu_additem() but you don't use them ... Instead you could use them to hold the userid of the donating player, and then retrieve it.
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 05-07-2013 , 08:39   Re: Correct Way To Show Menu/Msg To Owner & Target?
Reply With Quote #3

its ok i figured out what i was doing wrong.
__________________
Blizzard_87 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 10:46.


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