08.06.2018, 19:12
I have installed the latest streamer version, and i have a problem about pickups.
I have a war system and when a player die, in his position i create 2 pickups: 1 for health and 1 for player's gun .
The problem is that the pickups aren't created and i don't know why..
I have this code in onplayerdeath, see here:
How can i fix this?
I have a war system and when a player die, in his position i create 2 pickups: 1 for health and 1 for player's gun .
The problem is that the pickups aren't created and i don't know why..
I have this code in onplayerdeath, see here:
Код:
public OnPlayerDeath(playerid, killerid, reason) { if(killerid != INVALID_PLAYER_ID) { SendClientMessage(playerid, -1, "You have been killed by another player!"); new Float:pos[3]; GetPlayerPos(playerid, pos[0], pos[1], pos[2]); pickup1[playerid] = CreateDynamicPickup(1241, 23, pos[0] + 2.0, pos[1] + 2.0, pos[2], 0, 0, INVALID_PLAYER_ID, 30.0); if(GetPlayerWeapon(playerid) == 24) { pickup2[playerid] = CreateDynamicPickup(348, 23, pos[0], pos[1], pos[2], 0, 0, INVALID_PLAYER_ID, 30.0); pickup2GUN[playerid] = 24; } } return 1; }