15.01.2011, 12:32
OMG part of tha bug is fixed !! (now only the infected player loos heath ) but killtimer don't work !!
when a plyaer take an anti-virus the player still infected pls help
ohh & when i leave tha game & respawn i still infected
when a plyaer take an anti-virus the player still infected pls help
ohh & when i leave tha game & respawn i still infected
Quote:
new infect_timer[MAX_PLAYERS]; public OnPlayerDisconnect(playerid, reason) { S_OnPlayerDisconnect(playerid); KillTimer(infect_timer[playerid]); } if ((newkeys & KEY_FIRE) && (team[playerid] == 6)) { new Float: hp, Float: a; new target = GetClosestPlayer(playerid); if (GetDistanceBetweenPlayers(playerid, target) <= 1) { KillTimer(infect_timer[playerid]); // this one infect_timer[playerid] = SetTimerEx("infectedtimer", 5000, true, "d", target); SetPlayerDrunkLevel(target, 10000); ApplyAnimation(target, "ped", "KO_shot_face", 1.1, 0, 1, 1, 0, 0); GameTextForPlayer(target, "~r~ Tyrant Hit you !!", 3000, 1); } return 1; } public OnPlayerPickUpPickup(playerid, pickupid) if (pickupid == anti) { new Float: health; GetPlayerHealth(playerid, health); KillTimer(infect_timer[playerid]); if (health < 100) { SetPlayerDrunkLevel(playerid, 0); SetPlayerHealth(playerid, 100.0); GameTextForPlayer(playerid, "~w~you inject the antidote", 3000, 4); } return 1; } forward infectedtimer(playerid); public infectedtimer(playerid) { new Float: hp; GetPlayerHealth(playerid, hp); SetPlayerHealth(playerid, hp - 5); if (IsPlayerInRangeOfPoint(playerd, 2, 358.2446, 206.3789, 1008.382) { KillTimer(infect_timer[playerid]); } return 1; } |