27.12.2009, 00:44
Well when i do /mask it is suppose to turn on mask ok dat works but if i have the mask on and i do /mask it is suppose to take off the mask but it doesnt heres my command
Please help thanks
Код:
if(strcmp(cmd, "/mask", true) == 0) // by LordMan { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pMask] < 0) { SendClientMessage(playerid, COLOR_GRAD1, " You must be level 5."); return 1; } if(PlayerInfo[playerid][pLevel] < 5) { SendClientMessage(playerid, COLOR_GRAD1, " You are not able to use it."); return 1; } for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { ShowPlayerNameTagForPlayer(i, playerid, 0); } } format(string, sizeof(string), "~p~You have put your mask on"); GameTextForPlayer(playerid, string, 4000, 3); PlayerInfo[playerid][pMaskuse] = 1; OnPropUpdate(); return 1; } else if(PlayerInfo[playerid][pMaskuse] == 1) { for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { ShowPlayerNameTagForPlayer(i, playerid, 1); } } format(string, sizeof(string), "~p~You have tooken off the mask"); GameTextForPlayer(playerid, string, 4000, 3); PlayerInfo[playerid][pMaskuse] = 0; OnPropUpdate(); } return 1; }