SA-MP Forums Archive
Need some help - 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: Need some help (/showthread.php?tid=96640)



Need some help - Striker_Moe - 09.09.2009

Код:
	if(GetPlayerSkin(playerid) == 287)
	{
	  new name;
	  if(GetPlayerColor(playerid) == 0xAFAFAFAA)
		{
		  GetPlayerName(playerid,name);
			format(string, sizeof(string), ":: SERVER kicked %s. Reason: Bugged spawn, please relog. ::", name);
			SendClientMessageToAll(COLOR_RED, string);
			Kick(playerid);
		}
	}
	return 1;
}
Whats wrong here? I get 5 errors.


Re: Need some help - Correlli - 09.09.2009

Learn how to use GetPlayerName function: https://sampwiki.blast.hk/wiki/GetPlayerName


Re: Need some help - mr.b - 13.09.2009

try this

Quote:

if(GetPlayerSkin(playerid) == 287)
{
new name[MAX_PLAYER_NAME];
new string[128];
if(GetPlayerColor(playerid) == 0xAFAFAFAA)
{
GetPlayerName(playerid,name,sizeof(name));
format(string, sizeof(string), ":: SERVER kicked %s. Reason: Bugged spawn, please relog. ::", name);
SendClientMessageToAll(COLOR_RED, string);
Kick(playerid);
}
}
return 1;

}