06.10.2012, 04:58
(
Последний раз редактировалось Knight_Rider; 06.10.2012 в 04:59.
Причина: enum
)
Define:-
Command :-
Код:
new HasBoughtMask[MAX_PLAYERS];
Код:
CMD:mask(playerid, params[]) { new name[MAX_PLAYER_NAME]; new string[42]; if(HasBoughtMask[playerid] == 0) { 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); } return 1; }
Код:
enum pInfo { pMask, };