Hallo,
bekomme immer 2-3 Errors bei meinem Callback OnPlayerPickUpPickUp.
Und dazu noch viele Warnings. Vielleicht weiß ja jemand weiter ...
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == w1flag1 || pickupid == w1flag2 || pickupid == w1flag3 || pickupid == w2flag1 || pickupid == w2flag2
|| pickupid == w2flag3 || pickupid == w3flag1 || pickupid == w3flag2 || pickupid == w3flag3 || pickupid == w4flag1
|| pickupid == w4flag2 || pickupid == w4flag3 || pickupid == w5flag1 || pickupid == w5flag2 || pickupid == w5flag3
|| pickupid == w7flag1 || pickupid == w7flag2 || pickupid == w7flag3
|| pickupid == w8flag1 || pickupid == w8flag2 || pickupid == w8flag3 || pickupid == w9flag1
|| pickupid == w9flag2 || pickupid == w9flag3 || pickupid == w10flag1 || pickupid == w10flag2
|| pickupid == w10flag3 ||) // Check that the pickup ID of the pickup they picked up is mypickup
{
if(flags[playerid] == 0)
{
SendClientMessageToAll(COLOR_GREEN, "%d has found a flag!",GetPlayerName(playerid)); // Message the player
GivePlayerMoney(playerid, 1000); // Give the player the money
flags[playerid] = 1;
}
if(flags[playerid] = 1)
{
SendClientMessageToAll(COLOR_GREEN, "%d has found the second flag!",GetPlayerName(playerid)); // Message the player
GivePlayerMoney(playerid, 2500); // Give the player the money
flags[playerid] = 2;
}
if(flags[playerid] == 2)
{
SendClientMessageToAll(COLOR_GREEN, "%d has found the last flag!",GetPlayerName(playerid)); // Message the player
GivePlayerMoney(playerid, 5000); // Give the player the money
flags[playerid] = 0;
if(gTeam[playerid] == 0)
{
SendClientMessageToAll(COLOR_RED, "The Mafia has won this battle."); // Message the player
}
if(gTeam[playerid] == 1)
{
SendClientMessageToAll(COLOR_MAFIA, "The FBI has won this battle."); // Message the player
}
}
// if you need to add more pickups, simply do this:
else
{
SendClientMessage(playerid,COLOR_WHITE,"Test");
}
return 1;
}