Message to kicked player -
Shellegg - 01.04.2009
So, my GM automatcly kick a player when he doesn't have a name like 1stName_LastName.
When some join the server with a nickname like "Shellegg" ht only see:
"Server closed the information."
How to send them a message telling them that they need a name with the format descripted above.
This is my actually "script"
pawn Код:
if(RPName(PlayerName(playerid),first,last))
{
.........
.........
.........
}
else
{
KickPlayer(playerid,"«Manalgas»","Invбlid Name, Correct form: Name_Surname.");
}
return 1;
Re: Message to kicked player -
FUNExtreme - 01.04.2009
Search the wiki for SendClientMessage and add the message before the Kickplayer line.
Re: Message to kicked player -
Pyrokid - 01.04.2009
SendClientMessage(...);
Kick(...);
SendClientMessage must go
before kick.
Re: Message to kicked player -
Shellegg - 01.04.2009
Thank you, tahat is what i need
Re: Message to kicked player -
FUNExtreme - 01.04.2009
At your service
Re: Message to kicked player -
Shellegg - 01.04.2009
pawn Код:
else
{
SendClientMessage(playerid, COLOR_ADMINCMD, "You have been kicked by «Manalgas» reason: you name must be Name_Surname");
KickPlayer(playerid,"«Manalgas»","Invбlid Name");
}
return 1;
Still not working..
Re: Message to kicked player -
Mikep - 01.04.2009
Use Kick(playerid);
Re: Message to kicked player -
LarzI - 01.04.2009
Or just let us see the function, and maybe we can fix it
Re: Message to kicked player -
Norn - 01.04.2009
Hes using my script, just replace the old functions with these.
pawn Код:
public KickPlayer(playerid,kickedby[MAX_PLAYER_NAME],reason[])
{
new string[128];
format(string,sizeof(string),"%s has been kicked by %s, Reason: %s ",GetPlayerNameEx(playerid),kickedby,reason);
SendClientMessageToAllEx(COLOR_ADMINCMD,string);
KickLog(string);
format(string,sizeof(string),"You have been kicked from the server, Reason: %s",reason);
SendClientMessage(playerid,COLOR_ADMINCMD,string);
return Kick(playerid);
}
public BanPlayerAccount(playerid,bannedby[MAX_PLAYER_NAME],reason[])
{
new string[128];
format(string,sizeof(string),"%s has been Account-Banned by %s, Reason: %s ",GetPlayerNameEx(playerid),bannedby,reason);
SendClientMessageToAllEx(COLOR_ADMINCMD,string);
AccountBanLog(string);
PlayerInfo[playerid][pBanned] = 1;
OnPlayerDataSave(playerid);
format(string,sizeof(string),"You have been account banned, Reason: %s",reason);
SendClientMessage(playerid,COLOR_ADMINCMD,string);
return Kick(playerid);
}
public BanPlayer(playerid,bannedby[MAX_PLAYER_NAME],reason[])
{
new string[128];
format(string,sizeof(string),"%s has been banned by %s, Reason: %s ",GetPlayerNameEx(playerid),bannedby,reason);
SendClientMessageToAllEx(COLOR_ADMINCMD,string);
BanLog(string);
format(string,sizeof(string),"You have been banned from the server, Reason: %s",reason);
SendClientMessage(playerid,COLOR_ADMINCMD,string);
return Ban(playerid);
}
I forgot to make it send them messages.
Re: Message to kicked player -
Shellegg - 02.04.2009
how to define
pawn Код:
undefined symbol "SendClientMessageToAllEx"
xD