Please someone Arrange this 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: Please someone Arrange this Command ! (
/showthread.php?tid=541299)
Please someone Arrange this Command ! -
Adarsh007 - 11.10.2014
Please Someone Arrange this Command to Proper Order !
Код:
{
if (strcmp("/guns", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, "AmmuNation", "Pistols\nSub-Machine Gun\nShotguns\nArmours\nSMG\nAssault", "Select", "Cancel");
return 1;
}
return 1;
}
And I want this System in the above code-
Код:
{
if(IsPlayerInRangeOfPoint(playerid, Range, My Coords X, Y, Z))
{
SendClientMessage(playerid,0xFFFFFFFF,"You are not in the area");
}
return 1;
}
So when a Player type command /guns a Message will show "You are not in the area" But if the player is in the Range Area he will get the guns dialog.
Re: Please someone Arrange this Command ! -
TheSimpleGuy - 11.10.2014
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, Range, My Coords X, Y, Z))
{
//function
}
else
{
//error message
}
Re: Please someone Arrange this Command ! -
Shaktimaan - 11.10.2014
pawn Код:
if (strcmp("/guns", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, Range, My Coords X, Y, Z))
{
SendClientMessage(playerid,0xFFFFFFFF,"You are not in the area");
}
else
{
ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, "AmmuNation", "Pistols\nSub-Machine Gun\nShotguns\nArmours\nSMG\nAssault", "Select", "Cancel");
return 1;
}
return 1;
}
Re: Please someone Arrange this Command ! -
oskarunt - 11.10.2014
This should work:
PHP код:
if (strcmp("/guns", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, Range, My Coords X, Y, Z))
{
ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, "AmmuNation", "Pistols\nSub-Machine Gun\nShotguns\nArmours\nSMG\nAssault", "Select", "Cancel");
}
else
{
SendClientMessage(playerid,0xFFFFFFFF,"-[ You are not in the area ]-");
}
return 1;
}