16.05.2015, 23:17
im pretty new to scripting but im trying to make it so you can hold your breath while aiming using space and aim button
i didnt really follow any tutorials just started it, can anyone help tho?
Код:
else if(newkeys & KEY_SPRINT && newkeys & KEY_AIM && weaponAttached[playerid] == 0) { if(BreatheTime[playerid] == 1) return SendClientMessage(playerid, COLOR_GREY, "You need to wait before holding your breathe again!"); SetPlayerDrunkLevel(playerid, 0); BreatheTimer[playerid] = SetTimerEx("BreathTime", 10000, false, "d", playerid); PlayerPlaySound(playerid, 165, 0.0, 0.0, 10.0); BreatheTime[playerid] = 1; return 1; } forward BreathTime(playerid); public BreathTime(playerid) { BreatheTime[playerid] = 0; SendClientMessage(playerid, 0x42CC33C8, "You can hold your breath again!"); return 1; }