21.08.2010, 00:54
(
Последний раз редактировалось sheepondrugs; 21.08.2010 в 01:07.
Причина: added more info
)
Hey people,
I have added a simple spawn health item to my server, but sometimes (rarely) it dissapears.
I don't know what the conditions are to make it dissapear from spawning, otherwise I'd of fixed it.
......any ideas??
The code simply spawns a constant health pack instantly for all players.
...anyways here's the code:
EDIT:
sometimes when a player picks up the health, the health is restored to the player, but the item does not get replaced.
I have added a simple spawn health item to my server, but sometimes (rarely) it dissapears.
I don't know what the conditions are to make it dissapear from spawning, otherwise I'd of fixed it.
......any ideas??
The code simply spawns a constant health pack instantly for all players.
...anyways here's the code:
Код:
new Health1;
Код:
public OnGameModeInit() { Health1 = CreatePickup(1240,1,2001.8210,1538.2219,13.58591);
Код:
public OnPlayerPickUpPickup(playerid, pickupid) { if(pickupid == Health1) { Health1 = CreatePickup(1240,1,2001.8210,1538.2219,13.58591); SetPlayerHealth(playerid,100.0); return 1; }
EDIT:
sometimes when a player picks up the health, the health is restored to the player, but the item does not get replaced.