Link this cmd together?
#1

Hey,

Can someone please link me these commands together, because when I do CMD:locker 3 times in the script it doen't let me.

Код:
CMD:locker(playerid, params[])
{
	if(PlayerInfo[playerid][pFaction] == 3 || PlayerInfo[playerid][pLeader] == 3)
	{
		if(IsPlayerInRangeOfPoint(playerid,3,1188.5157470703,-1350.9741210938, 2423.2648925781) || IsPlayerInRangeOfPoint(playerid,3,190.006759, 166.887557, 1997.859375))
		{
			ShowPlayerDialogEx(playerid, LSFMDMENU, DIALOG_STYLE_LIST, "LSFMD","Duty\nUniform\nEquipment\nCivilian", "Select", "Cancel");
		}
		else
		{
			SendClientMessage(playerid, COLOR_RED, "You're not in range of your LSFMD lockers.");
		}
	}
	return 1;
}
Код:
CMD:locker(playerid, params[])
{
	if(PlayerInfo[playerid][pFaction] == 9 || PlayerInfo[playerid][pLeader] == 9)
 	{
  		if(IsPlayerInRangeOfPoint(playerid, 4.0, 621.7416,-8.3904,1102.7633))
    	{
     		ShowPlayerDialog(playerid, DIALOG_SANNews, DIALOG_STYLE_LIST, "SANNews: Lockers", "Toggle Duty\nCamera\nKevlar Vest ($2000)\nFirst Aid Kit\n9mm ($1000)\nClothing Selection", "Proceed", "Cancel");
     	}
 		else
   		{
     		SendClientMessage(playerid, COLOR_WHITE, "You aren't in range of your SANNews lockers.");
     	}
  	}
  	return 1;
}
Код:
CMD:locker(playerid, params[])
{
	if(PlayerInfo[playerid][pFaction] == 2 || PlayerInfo[playerid][pLeader] == 2)
	{
		if(IsPlayerInRangeOfPoint(playerid,3,310.3679,-1537.5204,-45.1338))
		{
			ShowPlayerDialogEx(playerid, FDUTYMENU, DIALOG_STYLE_LIST, "FBI Menu","Duty\nEquipment\nSWAT Uniform\nUniform\nUndercover\nClear Suspect", "Select", "Cancel");
		}
		else
		{
			SendClientMessage(playerid, COLOR_WHITE, "You're not in range of your FBI lockers.");
		}
	}
	return 1;
}
I just want it so every faction can do /locker at the lockers instead of /lspd, /fbi and /lsfmd for each faction.
Reply
#2

PHP код:
CMD:locker(playeridparams[])
{
    if(
PlayerInfo[playerid][pFaction] == || PlayerInfo[playerid][pLeader] == 3)
    {
        if(
IsPlayerInRangeOfPoint(playerid,3,1188.5157470703,-1350.97412109382423.2648925781) || IsPlayerInRangeOfPoint(playerid,3,190.006759166.8875571997.859375))
        {
            
ShowPlayerDialogEx(playeridLSFMDMENUDIALOG_STYLE_LIST"LSFMD","Duty\nUniform\nEquipment\nCivilian""Select""Cancel");
        }
        else
        {
            
SendClientMessage(playeridCOLOR_RED"You're not in range of your LSFMD lockers.");
        }
    }
    else if(
PlayerInfo[playerid][pFaction] == || PlayerInfo[playerid][pLeader] == 9)
     {
          if(
IsPlayerInRangeOfPoint(playerid4.0621.7416,-8.3904,1102.7633))
        {
             
ShowPlayerDialog(playeridDIALOG_SANNewsDIALOG_STYLE_LIST"SANNews: Lockers""Toggle Duty\nCamera\nKevlar Vest ($2000)\nFirst Aid Kit\n9mm ($1000)\nClothing Selection""Proceed""Cancel");
         }
         else
           {
             
SendClientMessage(playeridCOLOR_WHITE"You aren't in range of your SANNews lockers.");
         }
    }
    else if(
PlayerInfo[playerid][pFaction] == || PlayerInfo[playerid][pLeader] == 2)
    {
        if(
IsPlayerInRangeOfPoint(playerid,3,310.3679,-1537.5204,-45.1338))
        {
            
ShowPlayerDialogEx(playeridFDUTYMENUDIALOG_STYLE_LIST"FBI Menu","Duty\nEquipment\nSWAT Uniform\nUniform\nUndercover\nClear Suspect""Select""Cancel");
        }
        else
        {
            
SendClientMessage(playeridCOLOR_WHITE"You're not in range of your FBI lockers.");
        }
    }
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)