AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   help me... (https://forums.alliedmods.net/showthread.php?t=178169)

aNNNak1N 02-12-2012 08:31

help me...
 
Hi, can you help me with a plugin...nick connected [country]
Picture: http://postimage.org/image/5f106ze91/

BeeFighter 02-12-2012 08:33

Re: help me...
 
Search before post.

aNNNak1N 02-12-2012 08:44

Re: help me...
 
I find that's why I posted

Napoleon_be 02-12-2012 09:12

Re: help me...
 
PHP Code:

#include <amxmodx>
#include <geoip>
#include <colorchat>

#define VERSION "1.0.0"

new szIP[16]

public 
plugin_init() {
    
register_plugin("User Connected"VERSION"NapoleoN#")
    
}

public 
client_putinserver(id) {
    
set_task(1.0"ShowMessage"id)
}

public 
ShowMessage(id) {
    new 
szCountry[32]; geoip_country(szIPszCountry)
    new 
szName[32] ; get_user_name(idszNamecharsmax(szName))
    
    
ColorChat(idGREEN"%s^x01 connected^x03 [%s]."szNameszCountry)


TESTED: Works.

aNNNak1N 02-12-2012 09:33

Re: help me...
 
works, but why
Code:

set_task(1.0


RoaR 02-12-2012 09:39

Re: help me...
 
Hmm, that should be shown like this:

PHP Code:

#include <amxmodx>
#include <geoip>
#include <colorchat>

public is_connected(id) {
new 
szCountry[32],szName[32],szIP[32];
geoip_country(szIP,szCountry)
get_user_name(id,szName,31)

ColorChat(id,GREEN,"%s^x01 has connected. Country:^x03 [%s].",szName,szCountry)



aNNNak1N 02-12-2012 09:49

Re: help me...
 
yeah! thanks all

RoaR 02-12-2012 09:53

Re: help me...
 
You're welcome.

BeeFighter 02-12-2012 09:55

Re: help me...
 
Quote:

Originally Posted by aNNNak1N (Post 1648942)
I find that's why I posted

Took me 5 seconds to find such script. without asking help here.

Napoleon_be 02-12-2012 10:00

Re: help me...
 
Quote:

Originally Posted by RoaR (Post 1648936)
Hmm, that should be shown like this:

PHP Code:

#include <amxmodx>
#include <geoip>
#include <colorchat>

public is_connected(id) {
new 
szCountry[32],szName[32],szIP[32];
geoip_country(szIP,szCountry)
get_user_name(id,szName,31)

ColorChat(id,GREEN,"%s^x01 has connected. Country:^x03 [%s].",szName,szCountry)



Did you even test this?


All times are GMT -4. The time now is 03:13.

Powered by vBulletin®
Copyright ©2000 - 2021, vBulletin Solutions, Inc.