TOP OF THE SCRIPT !
#define COLOR_RED 0xFF0000FF
now,
OnPlayerConnect(playerid)
pawn Код:
public OnPlayerConnect(playerid) //DO NOT PUT ; AFTER A CALLBACK
{
new pName[24];
GetPlayerName(playerid, pName, sizeof(pName));
new namestring = strfind(pName, "$", true); //what is plname?
if(namestring == 1)
{
SendClientMessage(playerid, COLOR_RED, "Please remove the $ from your name!");
Kick(playerid);
return 1;
}
return 1;
}
sorry about the $ dunno what happened.
Or the "bot style"
pawn Код:
public OnPlayerConnect(playerid)
{
new pName[24];
GetPlayerName(playerid, pName, sizeof(pName));
new namestring = strfind(pName, "$", true);
if(namestring == 1)
{
SendClientMessage(playerid, COLOR_RED, "Please remove the $ from your name!");
format(string, sizeof(string), "%s has been kicked for having $ in their name!", pName);
SendClientMessageToAll(COLOR_RED, string);
Kick(playerid);
return 1;
}
return 1;
}