13.04.2013, 00:49
Код:
COMMAND:changename(playerid,params[]) { new OtherPlayer12, Msg12[170], Name12[24], Message12[150], OtherPlayerName12[24]; SendAdminText(playerid,"/changename", params); if (APlayerData[playerid][PlayerLevel] < 5) return SendClientMessage(playerid, 0xFFFFFFFF, "[ERROR]: You don't have access!"); else if(sscanf(params, "rs[170]", OtherPlayer12, Message12)) return SendClientMessage(playerid,0xFFFFFFFF, "SYNTAX: /changename <name/id> <newname>"); GetPlayerName(playerid, Name12, sizeof(Name12)); GetPlayerName(OtherPlayer12, OtherPlayerName12, sizeof(OtherPlayerName12)); format(Msg12, sizeof(Msg12), "{FF6600}%s {FFFFFF}has changed {FF6600}%s {FFFFFF}his name to: {FF6600}%s", Name12, OtherPlayerName12, Message12); SendClientMessageToAll(0xFFFFFFFF, Msg12); SetPlayerName(OtherPlayer12, Message12); return 1; }