Raised This Month: $ Target: $400
 0% 

Repassing function arguments


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 08-05-2008 , 13:52   Repassing function arguments
Reply With Quote #1

Is thera a way to repasss funcion arguments to a secondary function? I will use that in an any:... format function like this:
PHP Code:
PrintActivity(id,key[],any:...)
{
    new 
name[32]
    
get_user_name(id,name,31)
    
show_activity(id,name"%L"LANG_PLAYERkeyany:...)

Got my idea? Is is possible?
danielkza is offline
draft
Senior Member
Join Date: Jul 2007
Location: Russia, Saint-Petersburg
Old 08-05-2008 , 14:49   Re: Repassing function arguments
Reply With Quote #2

What is show_activity?
May be u mean smth like this:
Code:
PrintActivity(id, key[], ...)
{
    new name[32]
    get_user_name(id,name,31)
    show_activity(id, name, key, ...)
}  
 
public show_activity(id, name, key, ...)
{
...
}
__________________
draft is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 08-05-2008 , 15:01   Re: Repassing function arguments
Reply With Quote #3

show_activity - Shows admin activity.
Syntax:
PHP Code:
show_activity id, const name[], ... ) 
Example:
PHP Code:
show_activity(id,playername,"slapped player"); 
If amx_show_activity is 2, will appear as: "ADMIN PlayerName: slapped player". If it is 1, it will appear as: "ADMIN: slapped player".
xPaw is offline
Old 08-05-2008, 15:36
XxAvalanchexX
This message has been deleted by XxAvalanchexX. Reason: whoops
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 08-05-2008 , 15:46   Re: Repassing function arguments
Reply With Quote #4

I though about vformat, but i was planning to pass them into show_acitivity,but i could just copy the code from amxmisc.inc and do the rest myself.

PS: For those who didn't understand, show_activity was only an example. I was going to use other functions, like log_amx and server_print. For now i'll stick with vformat.

Thanks for the help.
danielkza 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 05:40.


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