Hallo, liebe Leute,
public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
//Battlefield DM
if(pickupid == BF_WEAPON[0] || pickupid == BF_WEAPON[1] || pickupid == BF_WEAPON[2] || pickupid == BF_WEAPON[3])
{
GivePlayerWeapon(playerid, GRENADE, 5);
DestroyDynamicPickup(pickupid);
}
else if(pickupid == BF_WEAPON[4] || pickupid == BF_WEAPON[5] || pickupid == BF_WEAPON[6] || pickupid == BF_WEAPON[7] || pickupid == BF_WEAPON[8] || pickupid == BF_WEAPON[9])
{
GivePlayerWeapon(playerid, HEAT_SEEKER, 5);
DestroyDynamicPickup(pickupid);
}
for(new i; i < 9; i++)
{
if(pickupid == BF_WEAPON[i])
{
SetTimerEx("PickupRespawn", 60000, false, "i", i);
}
}
return 1;
}
forward PickupRespawn(pickupid);
public PickupRespawn(pickupid)
{
if(pickupid == BF_WEAPON[0]) return CreateDynamicPickup(342, 1, 120.5242, 1934.8777, 22.7578, 7, -1, -1, 100.0); //Grenade
if(pickupid == BF_WEAPON[1]) return CreateDynamicPickup(342, 1, 279.4142, 1829.5718, 21.4766, 7, -1, -1, 100.0); //Grenade
if(pickupid == BF_WEAPON[2]) return CreateDynamicPickup(342, 1, 116.2530, 1875.0065, 22.4375, 7, -1, -1, 100.0); //Grenade
if(pickupid == BF_WEAPON[3]) return CreateDynamicPickup(342, 1, 136.4600, 1874.9723, 22.4375, 7, -1, -1, 100.0); //Grenade
if(pickupid == BF_WEAPON[4]) return CreateDynamicPickup(360, 1, 189.9938, 1940.4785, 17.6406, 7, -1, -1, 100.0); //Heat Seeker
if(pickupid == BF_WEAPON[5]) return CreateDynamicPickup(360, 1, 206.2279, 1932.8312, 23.2422, 7, -1, -1, 100.0); //Heat Seeker
if(pickupid == BF_WEAPON[6]) return CreateDynamicPickup(360, 1, 144.0044, 1850.1791, 25.2610, 7, -1, -1, 100.0); //Heat Seeker
if(pickupid == BF_WEAPON[7]) return CreateDynamicPickup(360, 1, 211.4619, 1809.8109, 25.1172, 7, -1, -1, 100.0); //Heat Seeker
if(pickupid == BF_WEAPON[8]) return CreateDynamicPickup(360, 1, 146.3869, 1907.3638, 26.3924, 7, -1, -1, 100.0); //Heat Seeker
if(pickupid == BF_WEAPON[9]) return CreateDynamicPickup(360, 1, 197.3199, 1835.0059, 23.2422, 7, -1, -1, 100.0); //Heat Seeker
return 1;
}
Ich habe nun einmal probeweise ein Pickup aufgenommen und abgewartet, ob es nach 60 Sekunden wieder auftaucht - tut es nicht. Wenn ich mehrere Pickups in dem DM aufnehme, respawnen einige Pickups zufällig wieder, ich hab da aber kein wirkliches System darin erkannt...
Weiß jemand weiter?