Two SA-MP questions (scripting) -
Libra - 26.04.2010
Hello.
I need help with my new filterscript (Property System) - pickups.
I need two things. First:
Player is on position X=174 Y=637 Z=15. I want make a place here, where player can get money (10,000$). But... Here I need a money pickup (ID 1274) and it appears after 60 seconds after I pick up it. If I pick up this, i get 10,000$.
And second:
I want a place, where player get information about property. Here is house icon (ID 1273). If player pick up it, player gets information on the center of screen (with GameTextForPlayer). But the pickup doesn't disappears. I need the text, here is example of one house:
~w~House ID: 624
~w~House type ID: 19
~w~Price: 500,000,000$*
~w~Sell: 250,000,000$
~w~Owner: For Sale
Thanks for help.
* - yes, too big. But if player buy a property, he can enter a house (when he buy - it's empty). Inside the house there is marker where player can buy furniture and something other.
Re: Two SA-MP questions (scripting) -
dcmd_crash - 26.04.2010
Hi, look here:
https://sampwiki.blast.hk/wiki/CreatePickup
and here is the spawn types for pickups:
https://sampwiki.blast.hk/wiki/PickupTypes
Re: Two SA-MP questions (scripting) -
Libra - 26.04.2010
This is really good. But I already need help with "Pick up to get 10,000$"...
Yes, it is working
And I know how to make this first, thanks for anwser, _❼_
Re: Two SA-MP questions (scripting) - and one other (last) -
Libra - 26.04.2010
Ok guys, can you now help me?
I see this error: error 021: symbol already defined: "OnPlayerPickUpPickup". Can you guys fix it?
These Armour, Health, HouseIcon and other works perfectly.
Код:
//Health pickups
public OnPlayerPickUpPickup(playerid, pickupid)
{
if (pickupid == Health)
{
SetPlayerHealth(playerid,100);
GameTextForPlayer(playerid, "~y~You have found some health!", 5000, 3);
}
return 1;
}
//Armor pickups
public OnPlayerPickUpPickup(playerid, pickupid)
{
if (pickupid == Armour)
{
SetPlayerArmour(playerid,100);
GameTextForPlayer(playerid, "~y~You have found an armor!", 5000, 3);
}
return 1;
}
Re: Two SA-MP questions (scripting) -
dcmd_crash - 26.04.2010
Lol, you only define one callback, and put everything under it
No need for several, do it like below:
pawn Код:
//Health pickups
public OnPlayerPickUpPickup(playerid, pickupid)
{
if (pickupid == Health)
{
SetPlayerHealth(playerid,100);
GameTextForPlayer(playerid, "~y~You have found some health!", 5000, 3);
}
if (pickupid == Armour)
{
SetPlayerArmour(playerid,100);
GameTextForPlayer(playerid, "~y~You have found an armor!", 5000, 3);
}
return 1;
}
Re: Two SA-MP questions (scripting) -
Libra - 26.04.2010
Ok! Thanks for help
Re: Two SA-MP questions (scripting) -
dcmd_crash - 26.04.2010
No problem, PM me if you need any more help.