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

Chat With Your Country!


Post New Thread Reply   
 
Thread Tools Display Modes
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 01-07-2011 , 23:20   Re: Chat With Your Country!
Reply With Quote #21

Fixed. I updated what you meant by players[i], and what I thought you meant by the countries[id] is to copy it to another array and use that instead of calling countries[id] every time.
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-08-2011 , 05:58   Re: Chat With Your Country!
Reply With Quote #22

Ok, to be honest, i'm not really sure of what is better, cache countries[id] and then need to send copy native, or not cache it and save 1 native.
Chat is not often called so it's not really important.

Code is ok now, approved.

You could consider using charsmax (doesn't change plugin performances at all, but if you change array size one day you will thanks me) :
PHP Code:
    get_user_ipidips[id], 30 );
    
geoip_countryips[id], countries[id], 45 );
}

public 
cmdSayid )
{
    
    if( !
equalicountries[id], "error" ) )
    {
        new 
message2[200];
        
read_argsmessage2199 ); 
->

PHP Code:
    get_user_ipidips[id], charsmax(ips[]) );
    
geoip_countryips[id], countries[id], charsmax(countries[]) );
}

public 
cmdSayid )
{
    
    if( !
equalicountries[id], "error" ) )
    {
        new 
message2[200];
        
read_argsmessage2charsmax(message2) ); 
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 01-08-2011 , 10:45   Re: Chat With Your Country!
Reply With Quote #23

K will fix that, but usually too lazy to type charsmax out

EDIT: Fixed
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please

Last edited by nikhilgupta345; 01-08-2011 at 10:48.
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-08-2011 , 16:46   Re: Chat With Your Country!
Reply With Quote #24

When i write plugins, i sometimes put a macro at top of sma, same as charsmax macro :

#define cm(%0) ( sizeof(%0) - 1 )


If i plain to release the plugin i do replace all cm -> charsmax and delete macro ;)
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 01-08-2011 , 18:26   Re: Chat With Your Country!
Reply With Quote #25

Never thought of that. That's a good idea

I'll use that next time I use charsmax. Thanks
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
Old 02-02-2011, 01:33
x2anime
This message has been deleted by Matthias Vance. Reason: Server advertisement bot
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 03-08-2011 , 20:48   Re: Chat With Your Country!
Reply With Quote #26

I was thinking of adding languages to this plugin since that many people from different countries speak the same language, but I would like to know what languages you would like placed in there.
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
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 08:02.


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