26.05.2014, 22:22
Right, now I'm going to assume that you don't have a registration system here, just a login and play type thing? Or something, I honestly don't understand the request you're putting in here. But if you want to see it in "Tab" as well. Your best bet honestly would be to use a SetPlayerName.
But putting it like that in tab means that people can also impersonate your admins. So if you don't have a registration system, make one. And if it'd be a MySQL thing, borrow tags thing. I'd try and help you more, but reading your posts, I seriously didn't understand what you were asking for that much. Even when others got it wrong too.
But putting it like that in tab means that people can also impersonate your admins. So if you don't have a registration system, make one. And if it'd be a MySQL thing, borrow tags thing. I'd try and help you more, but reading your posts, I seriously didn't understand what you were asking for that much. Even when others got it wrong too.
Код:
CMD:name(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] >= 9999) { new giveplayerid, result[21]; new sendername[MAX_PLAYER_NAME]; new tmp[MAX_PLAYER_NAME]; if(!sscanf(params, "us[21]", giveplayerid, result)) { format(PlayerInfo[giveplayerid][pAdminName], 21, "%s", result); strcat(sendername, PlayerName(playerid)); new string[128]; new escstr[MAX_PLAYER_NAME]; mysql_real_escape_string(tmp,escstr); format(string, sizeof(string), "UPDATE `userinfo` SET `AdminName`='%s' WHERE `id`=%d ;", escstr, PlayerInfo[playerid][pSQLID]); format(string, sizeof(string), "Envision-Bot: %s has set your AdminName to %s.", sendername, tmp, PlayerInfo[giveplayerid][pAdminName]); SendClientMessage(playerid, COLOR_ORANGE, string); format(string, sizeof(string), "Envision-Bot: %s has set %s's Admin Name to: %s.", PlayerName(playerid), PlayerName(giveplayerid), PlayerInfo[giveplayerid][pAdminName]); ABroadCast(COLOR_YELLOW2, string, 1); } else { SendClientMessage(playerid, COLOR_GREY, "Invalid player!"); } } else { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /Name [PlayerID/PartOfName] [Admin Name]"); SendClientMessage(playerid, COLOR_LIGHTBLUE, "Set's the players Admin Name."); } return 1; } CMD:title(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] >= 9999) { new giveplayerid, result[21]; new sendername[MAX_PLAYER_NAME]; new tmp[MAX_PLAYER_NAME]; if(!sscanf(params, "us[21]", giveplayerid, result)) { format(PlayerInfo[giveplayerid][pAdminTitle], 21, "%s", result); strcat(sendername, PlayerName(playerid)); new string[128]; new escstr[MAX_PLAYER_NAME]; mysql_real_escape_string(tmp,escstr); format(string, sizeof(string), "UPDATE `userinfo` SET `AdminTitle`='%s' WHERE `id`=%d ;", escstr, PlayerInfo[playerid][pSQLID]); format(string, sizeof(string), "Envision-Bot: %s has change your AdminTitle to %s.", sendername, tmp, PlayerInfo[giveplayerid][pAdminTitle]); SendClientMessage(giveplayerid, COLOR_ORANGE, string); format(string, sizeof(string), "Envision-Bot: %s has set %s's Admin Title to: %s.", PlayerName(playerid), PlayerName(giveplayerid), PlayerInfo[giveplayerid][pAdminTitle]); ABroadCast(COLOR_YELLOW2, string, 1); } else { SendClientMessage(playerid, COLOR_GREY, "Invalid player specified."); } } else { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /SetAdminTitle [PlayerID/PartOfName] [Admin Title]"); SendClientMessage(playerid, COLOR_LIGHTBLUE, "Set's the players Admin title."); } return 1; }