Hey,
du gibst beim Timer ebenfalls nicht an welches Pickup
Versuch es mal so
new BF_Weapon[10];
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<10;i++)
{
if(i==0||i==1||i==2){ GivePlayerWeapon(playerid, GRENADE, 5); }
if(i==3||i==4||i==5){ GivePlayerWeapon(playerid, ROCKET_LAUNCHER, 4); }
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 DM_OnPlayerPickUpDynamicPickup(playerid, pickupid);
}
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(359, 1, 189.9938, 1940.4785, 17.6406, 7, -1, -1, 100.0); //Rocket Launcher
if(pickupid == BF_WEAPON[5]) return CreateDynamicPickup(359, 1, 206.2279, 1932.8312, 23.2422, 7, -1, -1, 100.0); //Rocket Launcher
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;
}