Recent Posts
Bash | 9 sec ago
None | 13 sec ago
VIM | 25 sec ago
C | 26 sec ago
None | 33 sec ago
None | 46 sec ago
None | 1 min ago
None | 1 min ago
None | 1 min ago
None | 1 min ago
Sitereport
Find cool info about any domain on the internet?
visit sitereport
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
Learn a little bit about the new Pastebin.com on our help page. hide message
By Anonymous on the 9th of Feb 2010 10:36:59 PM Download | Raw | Embed | Report
  1. public OnPlayerConnect(playerid)
  2. {
  3.     new pname[MAX_PLAYER_NAME], idx, found;
  4.     GetPlayerName(playerid, pname, sizeof pname);    
  5.     while(pname[idx])    
  6.     {
  7.         if(pname[idx] == '[' || pname[idx] == ']')
  8.         {        
  9.             SendClientMessage(playerid, COLOR_RED, "Seu nome não pode conter os seguintes caracteres: [ ]");            
  10.             Kick(playerid);
  11.             return 1;
  12.         }
  13.         if(pname[idx] == '_')
  14.         {        
  15.             found = 1;            
  16.             break;
  17.         }
  18.         idx++;      
  19.     }    
  20.     if(!found)    
  21.     {
  22.         SendClientMessage(playerid, COLOR_RED, "Seu nome precisa estar no formato: Nome_Sobrenome");
  23.         Kick(playerid);
  24.         return 1;            
  25.     }
  26.     return 1;
  27. }
Submit a correction or amendment below. Make A New Post
To highlight particular lines, prefix each line with @h@
Syntax highlighting:
Post expiration:
Post exposure:
Name / Title:
Email: