Kick automatic
#1

Hello, for a future I want to put clans in my server, in order that the people do not invent the clan or his nick is spy [ware] and similar things I would like to be able do like in order that when someone between with these signs they expel him from the servant automatically
Kes to say if some player has a nick with this "[" or "]" expel it immediately

Thank you
Reply
#2

Код:
if(strfind(GetPlayerNameEx(playerid), "[", false) != -1 && strfind(GetPlayerNameEx(playerid), "]", false) != -1)
{
  Kick(playerid);
}
Код:
stock GetPlayerNameEx(playerid)
{
  GetPlayerName(playerid,string,24);
  return string;
}
Try this.
Reply
#3

What ? I will be silly but .. where I put this? In OnPlayerConect? And it of below?
Reply
#4

Quote:
Originally Posted by spyware·
What ? I will be silly but .. where I put this? In OnPlayerConect? And it of below?
Put GetPlayerNameEx anywhere in the script,

put the
Код:
if(strfind(GetPlayerNameEx(playerid), "[", false) != -1 && strfind(GetPlayerNameEx(playerid), "]", false) != -1)
{
  Kick(playerid);
}
under OnPlayerConnect
Reply
#5

1 error

error 010: invalid function or declaration
Reply
#6

Show me the line of the error, because the anti [ ] works on my server.
Reply
#7

these:

C:\Documents and Settings\Escritorio\sa-mp\gamemodes\Deathmatch.pwn(163) : error 010: invalid function or declaration
Reply
#8

Quote:
Originally Posted by spyware·
these:

C:\Documents and Settings\Escritorio\sa-mp\gamemodes\Deathmatch.pwn(163) : error 010: invalid function or declaration
Quote:
Originally Posted by Eric_
Show me the line of the error, because the anti [ ] works on my server.
Reply
#9

Excuse me I do not speak Englishman and the translator sometimes confuses the word

if(strfind(GetPlayerNameEx(playerid), "[", false) != -1 && strfind(GetPlayerNameEx(playerid), "]", false) != -1)
Reply
#10

Quote:
Originally Posted by spyware·
Excuse me I do not speak Englishman and the translator sometimes confuses the word

if(strfind(GetPlayerNameEx(playerid), "[", false) != -1 && strfind(GetPlayerNameEx(playerid), "]", false) != -1)
Are you 100% sure? It works on mine D:

Try re-adding it.. Maybe you put it in wrong
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)