in-game id not working
#4

Mhm, i had same problem with sscanf parameter U, player is online, but after few hour of playing on server, it gets buggy, so i found a fix by ******, just add this to your gamemode:
PHP код:
SSCANF:u(name[])
{
    
// No name specified
    
if(isnull(name)) return INVALID_PLAYER_ID;
    new 
id;
    
// Was a part of name provided?
    
if(sscanf(name"i"id))
    {
        new 
matches;
        
// Find a player return the id
        
foreach(new Player)
        {
            
// Search for part of the players name
            
if(strfind(PlayerNames[i], nametrue) != -1)
            {
                
matches++;
                
id i;
                if(
matches 1) return INVALID_PLAYER_ID;
            }
        }
        
// Found a match
        
if(matches) return id;
        
// No player found return invalid player id
        
return INVALID_PLAYER_ID;
    }
    
// Player supplied a id
    // Make sure the id is greater than 0
    
if(id 0) return INVALID_PLAYER_ID;
    
// Make sure the id is connected
    
if(!IsPlayerConnected(id)) return INVALID_PLAYER_ID;
    
// Return the id
    
return id;

Reply


Messages In This Thread
in-game id not working - by Hapukoorepakk - 08.07.2016, 15:19
Re: in-game id not working - by diego200052 - 08.07.2016, 15:20
Re: in-game id not working - by Hapukoorepakk - 08.07.2016, 15:23
Re: in-game id not working - by Dusan01 - 08.07.2016, 15:31
Re: in-game id not working - by diego200052 - 08.07.2016, 15:33
Re: in-game id not working - by Dusan01 - 08.07.2016, 15:42
Re: in-game id not working - by diego200052 - 08.07.2016, 15:47
Re: in-game id not working - by Dusan01 - 08.07.2016, 15:50
Re: in-game id not working - by Stinged - 08.07.2016, 16:00
Re: in-game id not working - by Dusan01 - 08.07.2016, 16:10

Forum Jump:


Users browsing this thread: 1 Guest(s)