Pickups help needed
#1

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:
Код:
new special1;
Код:
Код:
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
Reply
#2

your using ID 15 there which is the same as the ID 3 so i dunno
Reply
#3

Well, 3,15,22 are Pickupable, but doesnt't respawn so..

Any timers or what I have to do ?
Reply
#4

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.
Reply
#5

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.
Reply
#6

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);
}
Reply
#7

Thanks for the help Eddy. This is working now, thanks a lot
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)