SA-MP Forums Archive
BlackList - 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: BlackList (/showthread.php?tid=134897)



BlackList - ScottCFR - 18.03.2010

So i'm making a "BlackList" and i can't seem to get it to work.

I've had it under OnPlayerRequestSpawn, OnPlayerConnect, and OnPlayerSpawn.

anyway heres the code


Code:
	//** BlackList
	new Name[MAX_PLAYER_NAME];
	GetPlayerName(playerid, Name, sizeof(Name));
	// Names
	if(strcmp( Name, "[HPS]HellBeast"))
	{
	  SendClientMessage(playerid, RED, "BlackListed :(");
 		Ban(playerid);
	}
	//** BlackList



Re: BlackList - XGh0stz - 18.03.2010

if(strcmp( Name, "Hacker", false) ==0)

This will fix your problem because it's actually comparing the string to something :P
Unless I'm missing something of course... It's possible


Re: BlackList - ScottCFR - 18.03.2010

Thanks, Works fine


Re: BlackList - Born2die - 18.03.2010

May I suggest loading the blacklist from an ini. That way you could easily manage blacklisted members instead of constantly editing the GM/recompiling, ect.


Re: BlackList - viKKmaN - 18.03.2010

Check the link in my signature, blacklist. It loads the bans from file and you can also rangeban!


Re: BlackList - ScottCFR - 18.03.2010

That's kinda what i was gonna ask. How can i make it read from an INI file?


Re: BlackList - XGh0stz - 19.03.2010

https://sampwiki.blast.hk/wiki/How_to_read_from_INI_files