Hallo,
wie die Überschrift schon sagt, kriege ich wenn ich eine Waffe Bsp Deagle aufhebe immer [10] Schuss Munition. Obwohl der Spieler Bsp 999 Schuss hat.
Wo liegt daran der Fehler?
new PICKUP_AMMOW[MAX_PLAYERS];
OnPlayerDisconnect:
PICKUP_MODELW[playerid] = 0;
PICKUP_AMMOW[playerid] = 0;
OnPlayerPickUpPickup:
for(new i=0;i<MAX_PLAYERS;i++)
{
if(pickupid == pickup[i])
{
DestroyPickup(pickup[i]);
pickup[i] = 0;
GivePlayerWeapon(playerid,PICKUP_MODELW[i],PICKUP_AMMOW[i]);
PICKUP_MODELW[i] = 0;
PICKUP_AMMOW[i] = 0;
printf("Das Pickup %i (%i) wurde hier aufgehoben.",pickupid,pickup[i]);
return 1;
}
}
forward DropPlayerWeapons(playerid);
public DropPlayerWeapons(playerid)
{
new Float:x,Float:y,Float:z,dpw_model[MAX_PLAYERS];
dpw_model[playerid] = GetPlayerWeapon(playerid);
GetPlayerPos(playerid,x,y,z);
pickup[playerid] = CreatePickup(waffenarray[dpw_model[playerid]],3,x,y,z,-1);
SetTimerEx("DeletePickup",DeleteTime*1000,false,"d",pickup[playerid]);
//SetTimerEx("droppedweapons",3500,false,"ifffi",playerid,x,y,z,dpw_model[playerid]);
return 1;
}
Würde mich um antworten freuen.
Liebe Grüße,
Soldier.