07.06.2013, 08:10
Hey can u do on player use /mask to do that up on the players head writes : Stranger [ID: His ID] in color red , And when the player get it off then nothing...
Код:
CMD:mask(playerid, params[])// Fixed by Clemente { new name[MAX_PLAYER_NAME]; new string[42]; if(HasBoughtMask[playerid] == 1) { SendClientMessage(playerid, COLOR_GREY, "You don't have a mask."); return 1; } if(PlayerInfo[playerid][pMask] == 0) { for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { ShowPlayerNameTagForPlayer(i, playerid, 0); } } PlayerInfo[playerid][pMask] = 1; GetPlayerName(playerid, name, sizeof(name)); format(string, sizeof(string), "* %s has put a mask on.", name); ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); } else if(PlayerInfo[playerid][pMask] == 1) { for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { ShowPlayerNameTagForPlayer(i, playerid, 1); } } PlayerInfo[playerid][pMask] = 0; GetPlayerName(playerid, name, sizeof(name)); format(string, sizeof(string), "* %s has put their mask away.", name); ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); } else if(GetPVarInt(playerid, "EventToken")) { SendClientMessageEx(playerid, COLOR_GRAD1, "You can't use this while in an event."); } else if(PlayerInfo[playerid][pMember] != 8 || PlayerInfo[playerid][pMember] != 8 ) { SendClientMessageEx(playerid, COLOR_GREY, " You are not a member of the Hitman Agency !"); return 1; } return 1; }