*** Terrible Title Removed - 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)
+--- Thread: *** Terrible Title Removed (
/showthread.php?tid=387525)
*** Terrible Title Removed -
dr.lozer - 25.10.2012
Hi all SA-MP Gamers, today i got a problem with This Code
This Code Must Kick Those who are Fake Clan member
like some one came in my server with server clan and that person is not accepted to join the clan so it should ban him
sorry for my bad english
this is the code i use
Код:
public OnPlayerConnect(playerid)
{
new ClanCheck[50]; format(ClanCheck,50,"[Dr]%s",PlayerName(playerid));
if(!strcmp(ClanCheck,PlayerName(playerid),true)) {
if(!fexist(File) || fexist(File) && dini_Int(File,"Member") != 1) {
format(Message,128,"%s Has Been Kicked From Server [Reason: Fake Clan Member]",PlayerName(playerid));
SendClientMessageToAll(COLOR_RED,Message);
Kick(playerid);
}
}
return 1;
}
i understand wat is the problem but im not that much good scripter :P
Any one help
Код:
if(Helped && Worked return Rep1);
Re: [Dr.Lozer] Need Help Please! -
Riddick94 - 25.10.2012
What the file string is?
pawn Код:
#include <a_samp>
public OnPlayerConnect(playerid)
{
new string[128];
if(strfind(PlayerName(playerid), "[Dr]", true) != -1)
{
if(fexist(File) && dini_Int(File,"Member") != 1)
{
format(string, sizeof(string), "%s Has Been Kicked From Server [Reason: Fake Clan Member]", PlayerName(playerid));
SendClientMessageToAll(-1, string);
Kick(playerid);
}
}
return true;
}
stock PlayerName(playerid)
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
return pName;
}
That's a saved file i know but you should show.. its reading from PLAYER file or something else? And try this code.
Re: *** Terrible Title Removed -
dr.lozer - 25.10.2012
Oh Thank You Very much!! the string file is
Код:
format(File,256,"Users/%s.ini",PlayerName(playerid));