Location of player inside shop
#1

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
Reply
#2

Stop using vince's avatar!

No help!
Reply
#3

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)