/ng help please command
#1

Hey I made an HQ Locker's for the Army , There's the code , But that's doesnt work : Here's the code :

Код:
CMD:ng(playerid, params[])
{
	if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
	{
		if(IsPlayerInRangeOfPoint(playerid,0,1209.566162,-1686.522705,-39.734062) && GetPlayerVirtualWorld(playerid) == 0 || IsPlayerInRangeOfPoint(playerid,0,1209.566162,-1686.522705,-39.734062))// NG Duty
		{
			ShowPlayerDialog(playerid, NGMENU, DIALOG_STYLE_LIST, "National Guard","Duty\nUniforms\nWeapons\nUndercover\nClear Suspect\nKevlar Vest\nFirst Aid Kit\nAccessories", "Select", "Cancel");
		}
		else
		{
			SendClientMessageEx(playerid, COLOR_WHITE, "You aren't in range of your NG lockers.");
		}
	}
	return 1;
}

Somethang wrong I did here ? and here's the pic when I do /ng the locker's CMD :
Here's the pic;s :
Reply
#2

One issue I've looked at that could be the issue is the fact your in-range of point is, 0, That's not really possible. I've fixed it below for you!

Код:
CMD:ng(playerid, params[])
{
	if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
	{
		if(IsPlayerInRangeOfPoint(playerid, 3.0 ,1209.566162,-1686.522705,-39.734062) && GetPlayerVirtualWorld(playerid) == 0 || IsPlayerInRangeOfPoint(playerid, 3.0 ,1209.566162,-1686.522705,-39.734062))// NG Duty
		{
			ShowPlayerDialog(playerid, NGMENU, DIALOG_STYLE_LIST, "National Guard","Duty\nUniforms\nWeapons\nUndercover\nClear Suspect\nKevlar Vest\nFirst Aid Kit\nAccessories", "Select", "Cancel");
		}
		else
		{
			SendClientMessageEx(playerid, COLOR_WHITE, "You aren't in range of your NG lockers.");
		}
	}
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)