Please someone Arrange this Command !
#1

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

pawn Код:
if(IsPlayerInRangeOfPoint(playerid, Range, My Coords X, Y, Z))
    {
        //function
    }
    else
    {
       //error message
    }
Reply
#3

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;
}
Reply
#4

This should work:

PHP код:
if (strcmp("/guns"cmdtexttrue10) == 0)
{
    if(
IsPlayerInRangeOfPoint(playeridRangeMy Coords XYZ))
    {
       
ShowPlayerDialog(playeridDIALOGIDDIALOG_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;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)