07.03.2015, 22:47
(
Последний раз редактировалось RedCode; 08.03.2015 в 19:55.
Причина: Delete
)
Deleted
new VipLockerTimer[MAX_PLAYERS], // in top of script. bool:CanUseLocker[MAX_PLAYERS]; OnPlayerConnect(playerid): CanUseLocker[playerid] = true; in command : CanUseLocker[playerid] = false; VipLockerTimer[playerid] = SetTimerEx ...... ( when timer is done : CanUseLocker[playerid] = true; )
CMD:viplocker(playerid, params[]) { if(!CanUseLocker[playerid]) return SendClientMessage(playerid, COLOR_WHITE, "You have to wait before using locker again."); if(PlayerInfo[playerid][pDonator] >= 1) { if(IsPlayerInRangeOfPoint(playerid,3,-2653.1226, 1410.2570 ,906.2734)) { ShowPlayerDialogEx(playerid, viplocker, DIALOG_STYLE_LIST, "VIP Locker", "Health\nArmour\nDeagle", "Select", "Cancel"); } else { SendClientMessage(playerid, COLOR_WHITE, "You arent in correct place."); } } return 1; }
new VipLockerTimer[MAX_PLAYERS], // in top of script. bool:CanUseLocker[MAX_PLAYERS]; OnPlayerConnect(playerid) CanUseLocker[playerid] = true; // add this
CMD:viplocker(playerid, params[]) { if(CanUseLocker[playerid]==false) return SendClientMessage(playerid, COLOR_WHITE, "You have to wait before using locker again."); if(PlayerInfo[playerid][pDonator] >= 1) { if(IsPlayerInRangeOfPoint(playerid,3,-2653.1226, 1410.2570 ,906.2734)) { ShowPlayerDialogEx(playerid, viplocker, DIALOG_STYLE_LIST, "VIP Locker", "Health\nArmour\nDeagle", "Select", "Cancel"); VipLockerTimer[playerid] = SetTimerEx("VipLockerTime", 3600*1000, false, "i", playerid); CanUseLocker[playerid] = false; } else { SendClientMessage(playerid, COLOR_WHITE, "You arent in correct place."); } } return 1; } forward VipLockerTime(playerid); public VipLockerTime(playerid) { CanUseLocker[playerid] = true; return 1; }