public OnGameModeInit()
{
BF_WEAPON[0] = CreateDynamicPickup(342, 1, 120.5242, 1934.8777, 22.7578, 7, -1, -1, 100.0); //Grenade
BF_WEAPON[1] = CreateDynamicPickup(342, 1, 279.4142, 1829.5718, 21.4766, 7, -1, -1, 100.0); //Grenade
BF_WEAPON[2] = CreateDynamicPickup(342, 1, 116.2530, 1875.0065, 22.4375, 7, -1, -1, 100.0); //Grenade
BF_WEAPON[3] = CreateDynamicPickup(342, 1, 136.4600, 1874.9723, 22.4375, 7, -1, -1, 100.0); //Grenade
BF_WEAPON[4] = CreateDynamicPickup(359, 1, 189.9938, 1940.4785, 17.6406, 7, -1, -1, 100.0); //Rocket Launcher
BF_WEAPON[5] = CreateDynamicPickup(359, 1, 206.2279, 1932.8312, 23.2422, 7, -1, -1, 100.0); //Rocket Launcher
BF_WEAPON[6] = CreateDynamicPickup(360, 1, 144.0044, 1850.1791, 25.2610, 7, -1, -1, 100.0); //Heat Seeker
BF_WEAPON[7] = CreateDynamicPickup(360, 1, 211.4619, 1809.8109, 25.1172, 7, -1, -1, 100.0); //Heat Seeker
BF_WEAPON[8] = CreateDynamicPickup(360, 1, 146.3869, 1907.3638, 26.3924, 7, -1, -1, 100.0); //Heat Seeker
BF_WEAPON[9] = CreateDynamicPickup(360, 1, 197.3199, 1835.0059, 23.2422, 7, -1, -1, 100.0); //Heat Seeker
return DM_OnGameModeInit();
}
public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
for(new i = 0; i < 9; i++)
{
if(i == 0 || i == 1 || i == 2) GivePlayerWeapon(playerid, GRENADE, 5);
else if(i == 3 || i == 4 || i == 5) GivePlayerWeapon(playerid, ROCKET_LAUNCHER, 4);
else if(i == 6 || i == 7 || i == 8 || i == 9) GivePlayerWeapon(playerid, HEAT_SEEKER, 5);
DestroyDynamicPickup(BF_WEAPON[i]);
SetTimerEx("PickupRespawn", 45000, false, "i", i);
}
return _OnPlayerPickUpDynamicPickup(playerid, pickupid);
}
Leider klappt die Geschichte hier nicht. Wenn ich ein Pickup aufnehme, werden alle Pickups im Areal zerstört und respawnen gleichzeitig wieder. Zudem wird die Munition falsch vergeben.
Weiß jemand weiter?
Vielen Dank!