10.07.2012, 23:24
Код:
if (IsPlayerConnected(i)) GetPlayerName(i, roleplayname, MAX_PLAYER_NAME);
Код:
error 017: undefined symbol "i"
if (IsPlayerConnected(i)) GetPlayerName(i, roleplayname, MAX_PLAYER_NAME);
error 017: undefined symbol "i"
new i [MAX_PLAYERS]
new name[MAX_PLAYER_NAME], roleplayname[MAX_PLAYER_NAME] = "Will_Smith", goodbyemessage[108]; GetPlayerName(playerid, name, sizeof(name)); if (!IsRPName(name)) // you can control the max underlines, e.g if you allow max. 1 underlines, write this: if (!IsRPName(name, 1)) { for (new i = 0; i < MAX_PLAYERS; i++) if (IsPlayerConnected(i)) break; // find a player who is online (and hasn't got kicked from the server -> has got a RolePlay name if (IsPlayerConnected(i)) GetPlayerName(i, roleplayname, MAX_PLAYER_NAME); // if there was an online player, it's name will be the suggested roleplay name format (goodbyemessage, sizeof(goodbyemessage), "* %s was kicked, come back with a roleplay name such as %s", name, roleplayname); SendClientMessageToAll(-1, goodbyemessage); return Kick(playerid); } |