#1

Hello. I noticed that this "protection" only go to the first clan to clan but not otherwise. Could you please help me?

PHP код:
    new Cachedb mysql_query(mysql"SELECT * FROM `clans`"); 
    
GetPlayerName(playeridszNamesizeof(szName));
    for(new 
icache_get_row_count (); != j; ++i)
    {
        
cache_get_field_content(i"ID"szString); strval(szString);
        if(
strfind(szNameClanInfo[x][cTag], true) != -|| strfind(ClanInfo[x][cTag], szNametrue) != -1) {
            
SendClientMessage(playeridCOLOR_RED"Your name contains clan tag so you get a kick!");
            
SetTimerEx("KickPlayer"10000"d"playerid);
        }
        return 
1;
    }
    
cache_delete(db); 
Reply
#2

Help me?
Reply
#3

ce vrei sa faci ca nu inteleg ?
Reply
#4

Quote:
Originally Posted by jamal1992
Посмотреть сообщение
ce vrei sa faci ca nu inteleg ?
Am adaugat o protectie ca playerii sa nu-si poata pune nume care contin tag-uri iar aceasta functioneaza doar la primu clan, atat.
Reply
#5

Scoate return ala de acolo ca opreste loop-ul. Si apropo ms pt idee uitasem de aceasta restrictie )
Reply
#6

Sau poti pune asa:
Код:
if(strfind(szName, ClanInfo[x][cTag], true) != -1 || strfind(ClanInfo[x][cTag], szName, true) != -1)
{ 
            SendClientMessage(playerid, COLOR_RED, "Your name contains clan tag so you get a kick!"); 
            SetTimerEx("KickPlayer", 1000, 0, "d", playerid);
            return 1; // sau break;
 }
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)