Menu showing picking other pickups? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Menu showing picking other pickups? (
/showthread.php?tid=171515)
Menu showing picking other pickups? -
almighty - 26.08.2010
Hi... Me again xD... i have this code
Код:
if(pickupid == CanGerm1)
{
CanPick[playerid] = 0;
ShowMenuForPlayer(Cannon,playerid);
}
else if(pickupid == CanGerm2)
{
CanPick[playerid] = 1;
ShowMenuForPlayer(Cannon,playerid);
}
else if(pickupid == CanUSA1)
{
CanPick[playerid] = 2;
ShowMenuForPlayer(Cannon,playerid);
}
else if(pickupid == CanUSA2)
{
CanPick[playerid] = 3;
ShowMenuForPlayer(Cannon,playerid);
}
else if(pickupid == USAFIX)
{
SetPlayerPos(playerid,2565.7222,-2381.8369,29.5991);
SetPlayerFacingAngle(playerid,43.3101);
}
else
{
for (new I = 0; I<MAX_PLAYERS; I++)
{
if(pickupid == DeathWeapPick[I])
{
DestroyPickup(DeathWeapPick[I]);
}
}
}
return 1;
}
Now... the problem is that when i pick one of the DeathWeapPick it will show me the Cannon Menu... and i dont know why... any idea?..
Re: Menu showing picking other pickups? -
DiddyBop - 27.08.2010
pawn Код:
if(pickupid == CanGerm1)
{
CanPick[playerid] = 0;
returnShowMenuForPlayer(Cannon,playerid);
}
else if(pickupid == CanGerm2)
{
CanPick[playerid] = 1;
return ShowMenuForPlayer(Cannon,playerid);
}
else if(pickupid == CanUSA1)
{
CanPick[playerid] = 2;
return ShowMenuForPlayer(Cannon,playerid);
}
else if(pickupid == CanUSA2)
{
CanPick[playerid] = 3;
return ShowMenuForPlayer(Cannon,playerid);
}
else if(pickupid == USAFIX)
{
SetPlayerPos(playerid,2565.7222,-2381.8369,29.5991);
return SetPlayerFacingAngle(playerid,43.3101);
}
else
{
for (new I = 0; I<MAX_PLAYERS; I++)
{
if(pickupid == DeathWeapPick[I])
{
return DestroyPickup(DeathWeapPick[I]);
}
}
}
return 1;
}
Should work now