Location of player inside shop - 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)
+--- Thread: Location of player inside shop (
/showthread.php?tid=623645)
Location of player inside shop -
FunnyBear - 03.12.2016
Hey there,
I've made a command which shows the location of a player whether they're in the main world, inside a house or inside a shop. Everything works fine except it doesn't show the location of the player if they're
inside of a shop/
Here is my code:
Код:
CMD:loc(playerid, params[])
{
new
str[ 128 ],
id;
if( InBusiness{ id } == true )
{
for(new i = 0; i != sizeof(storeData); ++i)
{
format(str, sizeof(str), "[LOCATION]: %s, %s", storeData[i][shopName], GetZoneName(storeData[i][entPos][0], storeData[i][entPos][1], storeData[i][entPos][2]));
SendClientMessage(playerid, 0xC5F01AFF, str);
}
}
return 1;
}
I've edited the command just to show you the script for the shop, nothing else.
Could someone please help me?
Thanks
Re: Location of player inside shop - iLearner - 03.12.2016
Stop using vince's avatar!
No help!
Re: Location of player inside shop -
FunnyBear - 03.12.2016
Quote:
Originally Posted by iLearner
Stop using vince's avatar!
No help!
|
I've been using this avatar for at least 3 years now, and you're the first person to say that. If you offer no help, then please don't post.
What a waste!
Nevertheless, I still require help for this.
Re: Location of player inside shop -
SickAttack - 03.12.2016
Store the location for each player in an array, if they're in a house, put "House in", if in a business, put "Business in", compare the string to see if they're in either one.