17.05.2011, 09:51
You forgot what you need to place in OnPlayerConnect :P
target[256]. Are you goddamn crazy? You should read why not to use houmungous sizes. Maximum text message size is 128. - /nameban's lenght (7) The maximum string should be [121]
so, I suggest changing target[256] to target[121].
Also i prefer using this instead of GetPlayerName:
Then add this in OnPlayerConnect:
[pawn]
if (dini_Int(PlayerName(playerid),"idiot")) Kick(playerid);
Kicks him for having a bad name.
target[256]. Are you goddamn crazy? You should read why not to use houmungous sizes. Maximum text message size is 128. - /nameban's lenght (7) The maximum string should be [121]
so, I suggest changing target[256] to target[121].
Also i prefer using this instead of GetPlayerName:
pawn Код:
stock PlayerName(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
return name;
}
[pawn]
if (dini_Int(PlayerName(playerid),"idiot")) Kick(playerid);
Kicks him for having a bad name.