Anyone got a IsValidName stock?
#4

Quote:
Originally Posted by G4M3Ov3r
Посмотреть сообщение
PHP код:
stock IsValidName(playerid)
{
    if (
IsPlayerConnected(playerid))
    {
        new 
player[24];
        
GetPlayerName(playerid,player,24);
        for(new 
0strlen(player); n++)
        {
            if (
player[n] == '_') return 1;
            if (
player[n] == ']' || player[n] == '[') return 0;
        }
    }
    return 
0;

There you go
You got to be kidding me.....

There are much better exmples else where on the forum. Your function considers anything with a _ as a vailid name, everything thing else fails, as your script does.
Reply


Messages In This Thread
Anyone got a IsValidName stock? - by Snipa - 25.08.2011, 22:52
Re: Anyone got a IsValidName stock? - by =WoR=G4M3Ov3r - 25.08.2011, 22:55
Re: Anyone got a IsValidName stock? - by Snipa - 25.08.2011, 22:56
Re: Anyone got a IsValidName stock? - by mprofitt - 25.08.2011, 23:05
Re: Anyone got a IsValidName stock? - by =WoR=G4M3Ov3r - 25.08.2011, 23:07
Re: Anyone got a IsValidName stock? - by Snipa - 25.08.2011, 23:36
Re: Anyone got a IsValidName stock? - by =WoR=G4M3Ov3r - 25.08.2011, 23:39
Re: Anyone got a IsValidName stock? - by Bakr - 26.08.2011, 00:05
Re: Anyone got a IsValidName stock? - by =WoR=G4M3Ov3r - 26.08.2011, 00:12
Re: Anyone got a IsValidName stock? - by Bakr - 26.08.2011, 00:29

Forum Jump:


Users browsing this thread: 2 Guest(s)