Abend. ich habe Pickups mit einem Timer erstellt, wen man in einen reinläuft verschwindet er, und kommt nach 20 sec wieder. Das geht alles.
Doch nun kommen seltsame sachen, wen ich viele Pickups durchlaufen habe gehen Sie nicht mehr weg, Sie haben zwar keine funktion mehr für 25 sec. sind aber noch da,
an was liegt das?
Script:
//pickups af
new armouraf;
new healaf;
new gun1af;
new gun2af;
new gun3af;
forward pickupaf();
public OnGameModeInit()
{
//----------------------af pickup´s-------------------------------------
healaf=CreatePickup(1240,1,154.6924,2414.2466,17.5127);
armouraf=CreatePickup(1242,1,385.2402,2435.9065,16.5000);
gun1af=CreatePickup(342,1,171.2192,2644.9900,16.7544);
gun2af=CreatePickup(348,1,390.4875,2607.4714,16.4844);
gun3af=CreatePickup(357,1,447.1866,2545.8271,16.5697);
//------------Ende af pickup´s-------------------------------------------
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
//----------------------------------af Pickups Anfang-----------------------
if(pickupid==armouraf)
{
SetPlayerArmour(playerid, 100.0);
DestroyPickup(armouraf);
SetTimer("pickupaf", 20000, false);
}
if(pickupid==healaf)
{
SetPlayerHealth(playerid, 100.0);
DestroyPickup(healaf);
SetTimer("pickupaf", 20000, false);
}
if(pickupid==gun1af)
{
GivePlayerWeapon(playerid,16,3);
DestroyPickup(gun1af);
SetTimer("pickupaf", 20000, false);
}
if(pickupid==gun2af)
{
GivePlayerWeapon(playerid,24,10);
DestroyPickup(gun2af);
SetTimer("pickupaf", 20000, false);
}
if(pickupid==gun3af)
{
GivePlayerWeapon(playerid,33,10);
DestroyPickup(gun3af);
SetTimer("pickupaf", 20000, false);
}
//----------------------------------af Pickups Ende-------------------------
public pickupaf()
{
//----------------------af pickup´s-------------------------------------
healaf=CreatePickup(1240,1,154.6924,2414.2466,17.5127);
armouraf=CreatePickup(1242,1,385.2402,2435.9065,16.5000);
gun1af=CreatePickup(342,1,171.2192,2644.9900,16.7544);
gun2af=CreatePickup(348,1,390.4875,2607.4714,16.4844);
gun3af=CreatePickup(357,1,447.1866,2545.8271,16.5697);
//------------Ende af pickup´s-------------------------------------------
}
Ich habe zwei von dieser Art, haben abe andere "namen" "publicen" "Timer"
An was könnte das liegen?