26.12.2014, 17:31
Code:
CMD:fakeban { if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_RED, "You are not authorised to use this command"); { format(string, sizeof(string), "%s has been banned by %s, reason: %s.", GetPlayerNameEx(giveplayerid), GetPlayerNameEx(playerid), reason); SendClientMessageToAllEx(COLOR_RED, string); } return 1; } } }
Code:
GetPlayerNameEx(playerid) { new sz_playerName[MAX_PLAYER_NAME], i_pos; GetPlayerName(playerid, sz_playerName, MAX_PLAYER_NAME); while ((i_pos = strfind(sz_playerName, "_", false, i_pos)) != -1) sz_playerName[i_pos] = ' '; return sz_playerName; }