/ng help please command - 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: /ng help please command (
/showthread.php?tid=394940)
/ng help please command -
yaron0600 - 24.11.2012
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 :
Re: /ng help please command -
BigD - 24.11.2012
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;
}