How to make a command for a special name player or kick automatic a player that for name has 'Rodri'?
Thanks to all, Rodri. |
public OnIncomingConnection(playerid, ip_address[], port) {
new
name[MAX_PLAYER_NAME]
;
GetPlayerName(playerid, name, sizeof(name));
if (strcmp(name, "YourName", false)==0) {
// kick(playerid);
BlockIpAddress(ip_address, 10000); // Blocking a time 10 seconds
}
return true;
}
#include a_samp
public OnPlayerConnect(playerid)
{
new name[32];
GetPlayerName(playerid,name,sizeof(name));
if(strcmp(name, "Rodri", true)) {
SendClientMessage(playerid, -1, "Don't come back e.e");
Kick(playerid);
}
return 1;
}