[HELP] Mapicons - 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: [HELP] Mapicons (
/showthread.php?tid=157505)
[HELP] Mapicons -
WThieves - 06.07.2010
Hi there, i have made these mapicons:
pawn Код:
if(HouseInfo[h][hOwned] == 0)
{
CreateMapIcon(31,0, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
}
else if(HouseInfo[h][hOwned] == 1)
{
CreateMapIcon(32,0, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
}//HIER
But they both show a Green house (31) and if i buy a house (so its owned) they wont show a red house (32) what did i do wrong?
Re: [HELP] Mapicons -
TheKingOfSamp - 06.07.2010
i didn't understand what you need Exactly
Re: [HELP] Mapicons -
ToPhrESH - 06.07.2010
Quote:
Originally Posted by TheKingOfSamp
i didn't understand what you need Exactly
|
He set a grennhuse map icon for a house that hasn't been bought, and a red one that s owned. But when he buys one the green house doesn't change to red to notify if someone owns it.
OnTopic:
Try to delete the "==" to the one "=" like that. Like this: if(HouseInfo[h][hOwned] = 0)
if that doesn't work try to add switch if(HouseInfo[h][hOwned] == 0) and use case 0: and case 1:
I'm not 100% percent though
Re: [HELP] Mapicons -
FreshKilla - 06.07.2010
It might be the function you have for Map Icons, Ive done a simple edit to the script making it check the numbers more efficently but i think its the include/plugin you use for you're map icon.
pawn Код:
switch(HouseInfo[h][hOwned])
{
case 0:
{
CreateMapIcon(31,0, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
}
case 1:
{
CreateMapIcon(32,0, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
}
}