[SOLVED] Problem with strfind
#1

Hi..i wanted to make my clan tag to be useable by my admins only and did that:


Код:
	new string[256], msg[255], reas[254], nam[MAX_PLAYER_NAME];
	GetPlayerName(playerid, nam, sizeof(nam));
	format(string, sizeof(string), "%s", nam);
	new pNam[50]; GetPlayerName(playerid, pNam, 50);
	if(!strcmp(pNam, "TAG Name", true) || (pNam, "TAG Name2", true)){
	}else{
	if(strfind(string, "TAG", true) != -1){
		format(msg, sizeof(msg), "Bot kicked %s", nam);
		format(reas, sizeof(reas), "Reason: Unauthorized using of Tag.");
		SendClientMessageToAll(RED, msg);
		SendClientMessageToAll(RED, reas);
	 	SendClientMessage(playerid, WHITE, "---------------------------------------------------------------------");
		SendClientMessage(playerid, YELLOW, "You are not allowed to use the Tag. Please choose another name");
		SendClientMessage(playerid, WHITE, "---------------------------------------------------------------------");
		Kick(playerid);
 	}
}
if I don't try to make it usable for my clanmembers (leave the !strcmp(pNam) out) it works and kicks the tag users...
Reply


Messages In This Thread
[SOLVED] Problem with strfind - by Sascha - 28.04.2010, 18:47
Re: Problem with strfind - by MadeMan - 28.04.2010, 19:01

Forum Jump:


Users browsing this thread: 1 Guest(s)