SA-MP Forums Archive
Kick automatic - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Kick automatic (/showthread.php?tid=127514)



Kick automatic - spyware· - 13.02.2010

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


Re: Kick automatic - Eazy_Efolife - 13.02.2010

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


Re: Kick automatic - spyware· - 13.02.2010

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


Re: Kick automatic - Eazy_Efolife - 13.02.2010

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



Re: Kick automatic - spyware· - 13.02.2010

1 error

error 010: invalid function or declaration


Re: Kick automatic - Eazy_Efolife - 13.02.2010

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


Re: Kick automatic - spyware· - 13.02.2010

these:

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


Re: Kick automatic - Eazy_Efolife - 13.02.2010

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.



Re: Kick automatic - spyware· - 13.02.2010

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)


Re: Kick automatic - Eazy_Efolife - 13.02.2010

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