Pickups help needed - 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: Pickups help needed (
/showthread.php?tid=90136)
Pickups help needed -
XtremeChio - 06.08.2009
Hello,
So I've made 4 special packages. Each gives you +2 score and 20.000$
But I thought that Pickup ID 3 aka Never respawns was also if you relog.
So how could I do that if someone pics up the special package, he would never see it again ( Unless for server restart )
An example of my pickups, in this case pickup 1:
Код:
Код:
special1 = CreatePickup(1279,15,2160.8967,2111.6318,18.0782);
Код:
if (pickupid == special1)
{
GivePlayerMoney(playerid, 20000);
SetPlayerScore(playerid, GetPlayerScore(playerid) +2);
SendClientMessage(playerid,COLOR_YELLOW,"You just found the special pacakge");
SendClientMessage(playerid,COLOR_YELLOW,"You have received 2 scores and 20.000$");
}
What must I add so the player never sees it again..Thanks
Re: Pickups help needed -
pagie1111 - 06.08.2009
your using ID 15 there which is the same as the ID 3 so i dunno
Re: Pickups help needed -
XtremeChio - 06.08.2009
Well, 3,15,22 are Pickupable, but doesnt't respawn so..
Any timers or what I have to do ?
Re: Pickups help needed -
Sergei - 06.08.2009
Quote:
Originally Posted by XtremeChio
Well, 3,15,22 are Pickupable, but doesnt't respawn so..
Any timers or what I have to do ?
|
You can pickup them one time and they won't ever respawn again until you restart server or respawn them in other way, so no timers and nothing else.
Re: Pickups help needed -
XtremeChio - 06.08.2009
Strange, cause I got kicked ( testing ) and I got back on and I could see the pickup and I got the points& money. But I will try again..tho I dont think anything will change.
Re: Pickups help needed -
refshal - 06.08.2009
You have to destroy the pickup. Like this:
pawn Код:
if(pickupid == special1)
{
GivePlayerMoney(playerid, 20000);
SetPlayerScore(playerid, GetPlayerScore(playerid) +2);
SendClientMessage(playerid, COLOR_YELLOW, "You just found the special pacakge");
SendClientMessage(playerid, COLOR_YELLOW, "You have received 2 scores and 20.000$");
DestroyPickup(special1);
}
Re: Pickups help needed -
XtremeChio - 06.08.2009
Thanks for the help Eddy. This is working now, thanks a lot