*** Terrible Title Removed
#1

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);
Reply
#2

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.
Reply
#3

Oh Thank You Very much!! the string file is
Код:
format(File,256,"Users/%s.ini",PlayerName(playerid));
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)