Dynamic Lockers(small fix probably)
#1

Hi!

So, I have this dynamic locker system for a faction(LSPD).

When I click 'move to my location' it creates a locker point at my location and creates 3DText, it all works and I can /locker and that exact point

but when I try to set ANOTHER locker point nothing happens..

Code:


Код:
CMD:lockers(playerid, params[])
{
	new rank = PlayerInfo[playerid][pLSPD];
    if(rank < 1) return SCM(playerid, COLOR_WHITE, "You are not authorised to use that command.");
    {
	for(new i=1; i < MAX_FUEL_STATIONS; i++)
	{
		if(LockersPointCreated[i])
		{
			if(IsPlayerInRangeOfPoint(playerid, 15.0, LockerPos[i][0], LockerPos[i][1], LockerPos[i][2]))
			{
				ShowPlayerDialog(playerid, 249, DIALOG_STYLE_LIST, "Lockers", "Duty\nEquipment\nClothing\nUnder-Cover", "Select", "Cancel");
				return 1;
			}
		}
	}
	}
	return 1;
}
Код:
new LockersPointCreated[MAX_LOCKERS_POINT];
new Float:LockerPos[MAX_LOCKERS_POINT][3];
#define MAX_LOCKERS_POINT 50
Dialog response:
Код:
	if(dialogid == 1352) // LSPD LOCKER POINTS RESPONSES
	{
	if(response)
	{
	if(listitem == 0)
	{
	for(new i=1; i < MAX_LOCKERS_POINT; i++)
	{
	if(!LockersPointCreated[i])
	{
	new  Float: fTextPos[3];
	GetPlayerPos(playerid, fTextPos[0], fTextPos[1], fTextPos[2]);
	Create3DTextLabel(labelstr, 0xFFFFFFFF, fTextPos[0], fTextPos[1], fTextPos[2], 5.0, GetPlayerVirtualWorld(playerid), .testLOS = 1);
	GetPlayerPos(playerid, LockerPos[i][0], LockerPos[i][1], LockerPos[i][2]);
    LockersPointCreated[i] = 1;
    SaveFactionSystem(i);
	}
	if(listitem == 1)
	{
	SendClientMessage(playerid, COLOR_WHITE, "You have cancelled the locker position.");
	}
	}
	}
	}
	}
I dont get any warnings or errors either
Ignore the save faction system too, I added that a few minutes ago, that has nothing to do with it

Thanks so much ;3
Reply


Messages In This Thread
Dynamic Lockers(small fix probably) - by RLGaming - 14.09.2012, 20:33
Re: Dynamic Lockers(small fix probably) - by RLGaming - 14.09.2012, 21:15
Re: Dynamic Lockers(small fix probably) - by arvifilter - 14.09.2012, 21:29
Re: Dynamic Lockers(small fix probably) - by RLGaming - 14.09.2012, 21:40

Forum Jump:


Users browsing this thread: 1 Guest(s)