Hide 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: Hide pickups (
/showthread.php?tid=230615)
Hide pickups -
Beginnercoder - 23.02.2011
Hello, can someone create me a sample command to hide pickups?
Make the command /hidepickups
Re: Hide pickups -
Antonio [G-RP] - 23.02.2011
In order to do that, you will need to make your pickups saved to an array, and then delete them all (on hiding), and when you un-hide them, load them from the array.
Re: Hide pickups -
maramizo - 23.02.2011
pawn Код:
CMD:hidepickups(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF3300, "You're not a server administrator.");
for(new p = 0; p < MAX_PICKUPS; p++)
DestroyPickup(p);
return 1;
}
Careful though, that will destroy all pickups.
You can also use
Foreach to create and hide/un-hide the pickups.
Re: Hide pickups -
Steven82 - 23.02.2011
Define "hide" because there is a way to make them invisible.
Re: Hide pickups -
maramizo - 23.02.2011
Quote:
Originally Posted by Steven82
Define "hide" because there is a way to make them invisible.
|
What's that?
Re: Hide pickups -
Steven82 - 23.02.2011
Make it pickup type 0
"0 - The pickup does not display"
Re: Hide pickups -
maramizo - 23.02.2011
Quote:
Originally Posted by Steven82
Make it pickup type 0
"0 - The pickup does not display"
|
How does he change the pickup type and how does he change all the pickup types back? He has to use either foreach or store them in arrays.