Quote:
Originally Posted by bogeyman_EST
Use
pawn Код:
if(strfind(insert_new_name_string_here, "&") != -1 || strfind(insert_new_name_string_here, "$") != -1 || strfind(insert_new_name_string_here, "^") != -1 || strfind(insert_new_name_string_here, "@") != -1) return SendClientMesssage(playerid, 0xFF0000FF, "Invalid characters!"); //Here goes your code to change the nick.
|
this code work...
and this
Quote:
Originally Posted by bogeyman_EST
You could do a loop...
pawn Код:
for(new i = 0; i < new_name_string_length; i++) { switch(new_name_string[i]) { case '&', '$', '@', '^': return SendClientMessage(playerid, 0xFF0000FF, "Invalid characters!"); default: continue; } } //Here goes your code to change the nick
|
what new_name_string_length and new_name_string ?
i do
Код:
for(new i = 0; i < strfind(tmp); i++)
{
switch(tmp[i])
{
case '&', '$', '@', '^': return SendClientMessage(playerid, 0xFF0000FF, "Invalid characters!");
default: continue;
}
}
it is not right?
i have error
D:\samp\mod.pwn(1089
![Cool](images/smilies/cool.gif)
: warning 202: number of arguments does not match definition