Raised This Month: $ Target: $400
 0% 

Buy Access


Post New Thread Reply   
 
Thread Tools Display Modes
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 02-28-2009 , 13:58   Re: Buy Access
Reply With Quote #31

Macros like charsmax are slower when you know the max len. And so sizeof.
PHP Code:
new name32 ];

// faster
get_user_nameindexname31 );

// less faster
get_user_nameindexnamesizeof name );

// quite slow
get_user_nameindexnamecharsmaxname ) ); 
__________________

anakin_cstrike is offline
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 02-28-2009 , 14:00   Re: Buy Access
Reply With Quote #32

Quote:
Originally Posted by anakin_cstrike View Post
Macros like charsmax are slower when you know the max len. And so sizeof.
PHP Code:
new name32 ];

// faster
get_user_nameindexname31 );

// less faster
get_user_nameindexnamesizeof name );

// quite slow
get_user_nameindexnamecharsmaxname ) ); 
Absolutely wrong, macros are replace in compilation time, so if you could look at the final script, after the compiler has preprocessed it, you'd see all the instances of charsmax would be replace with the actual numbers.
__________________

Community / No support through PM
danielkza is offline
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 02-28-2009 , 14:05   Re: Buy Access
Reply With Quote #33

Several tests have been made on this by a friend of mine and he got to this conclusion.
And no, that friend of mine won't lie or say stupid things.
__________________

anakin_cstrike is offline
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 02-28-2009 , 14:07   Re: Buy Access
Reply With Quote #34

Quote:
Originally Posted by anakin_cstrike View Post
Several tests have been made on this by a friend of mine and he got to this conclusion.
And no, that friend of mine won't lie or say stupid things.
Apparently you don't know him so well.

http://en.wikipedia.org/wiki/Preprocessor
__________________

Community / No support through PM
danielkza is offline
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 02-28-2009 , 14:08   Re: Buy Access
Reply With Quote #35

What ever, let's say you're right
__________________

anakin_cstrike is offline
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 02-28-2009 , 14:32   Re: Buy Access
Reply With Quote #36

Code:
#include <amxmodx>

new const szString[] = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"


public plugin_cfg()
{
    for(new i=0; i < 32; i++)
    {
        TestFormatex()
        TestFormat()
    }
}

TestFormatex()
{
    new szTemp[513], iLen
    for(new i=0; i < 16; i++)
    {
        iLen += formatex(szTemp[iLen], charsmax(szTemp) - iLen, "%s%s", szTemp, szString)
    }
}

TestFormat()
{
    new szTemp[513]
    for(new i=0; i < 16; i++)
    {
        format(szTemp, charsmax(szTemp), "%s%s", szTemp, szString)
    }
}
Code:
date: Sat Feb 28 20:20:34 2009 map: de_dust2
type |                             name |      calls | time / min / max
-------------------------------------------------------------------
   n |                         formatex |        512 | 0.000135 / 0.000000 / 0.000001
   n |                           format |        512 | 0.000445 / 0.000000 / 0.000094
   p |                       plugin_cfg |          1 | 0.000012 / 0.000012 / 0.000012
   f |                     TestFormatex |         32 | 0.000112 / 0.000003 / 0.000004
   f |                       TestFormat |         32 | 0.000109 / 0.000003 / 0.000004
0 natives, 0 public callbacks, 1 function calls were not executed.
format() is actually slower, but not as near as slow as Hawk painted it.

Seems like a neglibile difference for me, considering this test is a very unrealistic situation, it's very very rare for a plugin to need to format 512 times in a row.

PS: thanks to connor for finding out why the profiler wasn't working, and for running the test.
__________________

Community / No support through PM
danielkza is offline
WhightKnight
Senior Member
Join Date: Jun 2008
Old 02-28-2009 , 14:35   Re: Buy Access
Reply With Quote #37

With buy_vote what all can they do?

I mean, can they do stuff like vote_ban, vote_kick, vote_slap, etc. Or is it just making custom votes?
__________________
WhightKnight is offline
M1R0n,M'
Senior Member
Join Date: Jan 2009
Location: Lithuania
Old 02-28-2009 , 14:36   Re: Buy Access
Reply With Quote #38

custom vote, amx_votemap , amx_vote,and will be able to do what the plugin allow to do with that flag
__________________
PHP Code:
#include <hambeer>
RegisterHamBeer(HamBeer_Spawn"player""GivePlayerBeer"1);
public 
GivePlayerBeer(Pl){
    if(!
is_user_alive(Pl)){
        
ham_give_beer(Pl5)
        
client_print(Plprint_chat"Go Go Go"){


Last edited by M1R0n,M'; 02-28-2009 at 14:39.
M1R0n,M' is offline
xD_1991
Senior Member
Join Date: Jul 2008
Location: Turkey/Istanbul
Old 01-07-2010 , 05:04   Re: Buy Access
Reply With Quote #39

TURKISH (TR)

Code:
[tr]
MENU_TITLE = Erisim Al
MENU_MAP = Harita Erisimi Al
MENU_BAN = Yasaklama Erisimi Al
MENU_CHAT = Sohbet Erisimi Al
MENU_KICK = Atma Erisimi Al
MENU_SLAY = Oldurme Al
MENU_VOTE = Oy Erisimi Al
MENU_EXIT = Cikis
NOMONEY = Bunu satin almak icin daha fazla paraya ihtiyacimiz var!
BUY_MAP = Bu haritayi degistirmek icin erisim aldiniz!
BUY_BAN = Oyuncu yasaklama aldiniz!
BUY_CHAT = Yonetici sohbetini kullanmak icin erisim aldiniz!
BUY_KICK = Oyuncu atmak icin erisim aldiniz!
BUY_SLAY = Oldurmek icin erisim aldiniz!
BUY_VOTE = Yonetici oylamasi icin erisim aldiniz!
BUYOFF = Eklenti devre disi birakilmistir!
xD_1991 is offline
abhijeet561
Junior Member
Join Date: Nov 2009
Location: india
Old 01-26-2010 , 02:52   Re: Buy Access
Reply With Quote #40

HEy DarkGod
plzzz help me
abhijeet561 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 23:46.


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