Posts: 1,072
Threads: 25
Joined: Jun 2007
Reputation:
0
Guys,
As you all may know, i have an script named nitrosfreeroam. So now this is my question:
The script has a very difficult propertysystem. And i want to set mapicons for it.
So green if not bought and red if bought.
But the difficult part is , it gets saved in the players.txt's.. And a player can buy/over-buy/sell
So i couldn't succeed in it.
And offcourse we also need a streamer, Double-O-Icons seems to be a good one.
Can someone help me with this?
I am willing to pm the link of script to you.
Posts: 156
Threads: 0
Joined: Mar 2008
Reputation:
0
A good place to start would be to tell us how you load the entrance coordinates for your properties.
Posts: 1,072
Threads: 25
Joined: Jun 2007
Reputation:
0
the entrances don't get loaded as they get in rp scripts.
Like entrancex and entrancey. But this is a different 0.1 script.
Posts: 156
Threads: 0
Joined: Mar 2008
Reputation:
0
They have to get loaded if you're saving properties. There must be some enum somewhere with coordinates for properties?
Posts: 3,262
Threads: 30
Joined: Aug 2008
Reputation:
0
Find a good map icons streamer for beginning.
Posts: 156
Threads: 0
Joined: Mar 2008
Reputation:
0
so this array, use this to set your map icons.
I dont know how this streamer works, so its hard to tell you where to add the code, but if you have an array with the proper coordinates, for example:
Float:HouseCoords[2][3] = {
{0.0,0.0,0.0},
{0.0,0.0,0.0}
};
(obviously it must have more coords, exit etc, I just put entrance only to help you understand how to use this)
use that array to add your map icons OnGameModeInit:
SetPlayerMapIcon(playerid, iconid, HouseCoords[houseid][0], HouseCoords[houseid][1], HouseCoords[houseid][2], markertype, color);
where "houseid" = the house ID (0 = first line in HouseCoords, 1 = second line, etc).
Do you understand how it works?
Posts: 1,072
Threads: 25
Joined: Jun 2007
Reputation:
0
yes i could have also come this far, but how to change when overbought and sold and bought. How to change it than?
Posts: 156
Threads: 0
Joined: Mar 2008
Reputation:
0
The default value given to propertyOwner[property] for a property not owned seems to be 999 (again, I dont know your script so correct this as you see fit).
So, all you need to do under OnGameModeInit:
if(propertyOwner[property] > 999) // which means the house is owned
{
SetPlayerMapIcon(icon for house owned);
}
else SetPLayerMapIcon(icon for house not owned);
Posts: 1,072
Threads: 25
Joined: Jun 2007
Reputation:
0
but that will only keep it at start of gamemode.
so if someone buys it in game, i will have to wait for restart, to see a red icon?