public OnPlayerPickUpPickup(playerid, pickupid)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(pickupid == MoneyPickup[i][0] || pickupid == MoneyPickup[i][1] || pickupid == MoneyPickup[i][2] || pickupid == MoneyPickup[i][3]
|| pickupid == MoneyPickup[i][4] || pickupid == MoneyPickup[i][5] || pickupid == MoneyPickup[i][6] || pickupid == MoneyPickup[i][7]
|| pickupid == MoneyPickup[i][8] || pickupid == MoneyPickup[i][9])
{
//GivePlayerMoney(playerid, MoneyLost[i]/NumberOfPickups);
SetPVarInt(playerid, "packet", GetPVarInt(playerid, "packet") + 1);
DestroyPickup(pickupid);
}
}
if(pickupid == pickup1)//------ Wenn der Spieler Pickup 1 aufnimmt ---------
{
if(gTeam[playerid]==TEAM_Gangsta)
if(GetHealthed[playerid] == false)
{
GameTextForPlayer(playerid,"~r~Heal bekommen",4000,5);
SetPlayerHealth(playerid,160);
GetHealthed[playerid] = true;
PlayerPlaySound(playerid,1054, 0.0, 0.0, 10.0);
SetTimerEx("HealthCheck",20000,false,"i",playerid);
}
}
if(pickupid == pickup2)
{
if(gTeam[playerid]==TEAM_Cops)
if(GetHealthed[playerid] == false)
{
GameTextForPlayer(playerid,"~r~Heal bekommen",4000,5);
SetPlayerHealth(playerid,160);
GetHealthed[playerid] = true;
PlayerPlaySound(playerid,1054, 0.0, 0.0, 10.0);
SetTimerEx("HealthCheck",20000,false,"i",playerid);
}
}
if(pickupid == pickup12)//------ Wenn der Spieler Pickup 1 aufnimmt --------
{
if(gTeam[playerid]==TEAM_Actecas)
if(GetHealthed[playerid] == false)
{
GameTextForPlayer(playerid,"~r~Heal bekommen",4000,5);
SetPlayerHealth(playerid,160);
GetHealthed[playerid] = true;
PlayerPlaySound(playerid,1054, 0.0, 0.0, 10.0);
SetTimerEx("HealthCheck",20000,false,"i",playerid);
}
}
if(pickupid == pickup13)
{
if(gTeam[playerid]==TEAM_Ballas)
if(GetHealthed[playerid] == false)
{
GameTextForPlayer(playerid,"~r~Heal bekommen",4000,5);
SetPlayerHealth(playerid,160);
GetHealthed[playerid] = true;
PlayerPlaySound(playerid,1054, 0.0, 0.0, 10.0);
SetTimerEx("HealthCheck",20000,false,"i",playerid);
}
}
Ich habe ein Pickup System das beim sterben pickups hinterlegt MoneyPickups
wenn ich diese jetzt aufnehme kommt beim 3ten mal immer "Heal bekommen" obwohl ich nicht ins Heal Pickup gerannt bin sondern ein MoneyPickup aufgenommen habe warum passiert das?
Die Pickups haben ja nicht den selben Namen