BlackList
#1

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

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

Thanks, Works fine
Reply
#4

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

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

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

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


Forum Jump:


Users browsing this thread: 2 Guest(s)