29.09.2012, 02:41
Код:
//===============================[Mask System]================================================= if(strcmp(cmd, "/mask", true) == 0) { if(IsPlayerConnected(playerid)) { if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, " You need to login first !"); return 1; } if(PlayerInfo[playerid][pMask] == 0) { SendClientMessage(playerid, COLOR_GREY, " You dont have a mask !"); return 1; } GetPlayerName(playerid, sendername, sizeof(sendername)); GiveNameSpace(sendername); if(PlayerInfo[playerid][pMaskUse] == 0) { PlayerInfo[playerid][pMaskUse] = 1; format(string, sizeof(string), "* Stranger puts a mask on."); for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, false); GameTextForPlayer(playerid, "~W~Nametags ~R~off", 5000, 5); } else { PlayerInfo[playerid][pMaskUse] = 0; for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, true); GameTextForPlayer(playerid, "~W~Nametags ~R~on", 5000, 5); if(PlayerInfo[playerid][pSex] == 1) { format(string, sizeof(string), "* %s puts his mask away.", sendername); } else { format(string, sizeof(string), "* %s puts her mask away.", sendername); } } ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); } return 1; }