pastebin
| #1 paste tool since 2002
create new paste
tools
api
archive
real-time
faq
pastebin
Follow @pastebin
create new paste
trending pastes
sign up
login
my settings
my profile
My Pastes
Public Pastes
Untitled
1 sec ago
Untitled
2 sec ago
Kecseméti
C++ | 6 sec ago
fullz,banklogins,dumps+...
18 sec ago
Radio
8 sec ago
Untitled
10 sec ago
Untitled
Python | 16 sec ago
Harling farm (UK) Anima...
26 sec ago
Layout Width
Share Pastebin
Untitled
By: a guest | Feb 9th, 2010 | Syntax:
C
| Size: 0.77 KB | Hits: 18 | Expires: Never
Download
|
Raw
|
Embed
|
Report abuse
public OnPlayerConnect
(
playerid
)
{
new pname
[
MAX_PLAYER_NAME
]
,
idx
,
found
;
GetPlayerName
(
playerid
,
pname
,
sizeof
pname
)
;
while
(
pname
[
idx
]
)
{
if
(
pname
[
idx
]
==
'['
||
pname
[
idx
]
==
']'
)
{
SendClientMessage
(
playerid
,
COLOR_RED
,
"Seu nome não pode conter os seguintes caracteres: [ ]"
)
;
Kick
(
playerid
)
;
return
1
;
}
if
(
pname
[
idx
]
==
'_'
)
{
found
=
1
;
break
;
}
idx
++;
}
if
(
!
found
)
{
SendClientMessage
(
playerid
,
COLOR_RED
,
"Seu nome precisa estar no formato: Nome_Sobrenome"
)
;
Kick
(
playerid
)
;
return
1
;
}
return
1
;
}
create new paste
|
create new version of this paste
RAW Paste Data