27.09.2018, 12:50
PHP код:
function create_player_drops(playerid)
{
new Float: x, Float: y, Float: z, p_weapon, p_ammo, getspace;
// Health
GetPlayerPos(playerid, x, y, z);
pickup_Health = CreatePickup(1240, 3, x, y+1, z, -1); // 1240 health pickup
for (new i = 0; i < 12; i++){
// weapon pickups
getspace++;
GetPlayerWeaponData(playerid, i, p_weapon, p_ammo);
pickup_Weapon = CreatePickup(WeaponObject(p_weapon), 3, x+getspace, y, z, -1);}
SetTimerEx("DestroyPlayerDrops", 10000, false, "i", playerid);
return 1;
}
PHP код:
forward DestroyPlayerDrops(playerid);
public DestroyPlayerDrops(playerid)
{
DestroyPickup(pickup_Health);
DestroyPickup(pickup_Weapon);
return 1;
}