picky,pickay,pack problem.. - 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: picky,pickay,pack problem.. (
/showthread.php?tid=163269)
picky,pickay,pack problem.. -
GaGlets(R) - 26.07.2010
So.. just relised to stop these shity timers, witch checks player positions and does something.
So crated a pickup, called it ptest=createpickup.. etc.
and moved to onplayerpickuppickup callback.
added lines
pawn Код:
if(pickupid == ptest)
{
show gametext...
}
But it wont work, when i pickupit, it does nothing.
Tried all of pickup types and nothing.
full code
pawn Код:
else if(pickupid == ptest)
{
GameTextForPlayer(playerid, "~y~Tu atradi celvedi.~n~ Raksti ~r~/guide ~y~,lai ar to iepazitos", 5000, 3);
}
Re: picky,pickay,pack problem.. -
mastasquizy - 26.07.2010
Why would you be using a timer for pickups?
As far as the pickup problem, make sure the "ptest" is defined as a new GLOBAL variable
pawn Код:
new ptest;
public OnGamemodeInit()
{
ptest=CreatePickup(//blah blah blah...
}
public OnPlayerPickUpPickup(playerid,pickupid/*etc*/)
{
if(pickupid==ptest)
{
//blah blah blah
}
}
and make sure you find an appropriate pickup type on the wiki.
Re: picky,pickay,pack problem.. -
GaGlets(R) - 26.07.2010
Yes, i wanted to use pickup type "23" tested it out, but nothing. Used "2" nothing too.
Ofcourse i have defined it as global variable.
I even tried out mixing at callback
adding returns etc.. but nothing.
Edit:
But my another one pick up is working fine. (stringers)
No u didnt understood( Timer for player to point checker)