Raised This Month: $ Target: $400
 0% 

Problem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 06-19-2009 , 04:45   Re: Problem
Reply With Quote #2

The way you did it totally suck.
You should create some database (file, vault or sql) and retrieve names from there.

PHP Code:
#include <amxmodx>

#define MAX_PLAYERS 32
new g_name[MAX_PLAYERS 1][32]
new 
bool:g_lock_name[MAX_PLAYERS 1]


public 
change_player_name(id){
    
//this function must change player name to g_name[id]
}

public 
client_infochanged(id){ //called when player changes name
    
new name[32]
    
get_user_info(id"name"name31)
    if(
g_lock_name[id] && !equals(nameg_name[id]))
        
change_player_name(id)
}

public 
load_name(id){
    new 
ip[32]
    
get_user_ip(idip31)
    
//now using ip retrieve player name from database
    //and store it in g_name[id]
    //if name was found in database then
    //g_lock_name[id] = true
}

public 
client_connect(id){
    
g_lock_name[id] = false
    load_name
(id)
    if(
g_lock_name[id])
        
change_player_name(id)

__________________
Impossible is Nothing
Sylwester is offline
 



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 15:28.


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