SA-MP Forums Archive
Help me Please! - 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: Help me Please! (/showthread.php?tid=492278)



Help me Please! - lizter008 - 03.02.2014

Код:
CMD:viplocker(playerid, params[])
{

		if(IsPlayerInRangeOfPoint(playerid,3,754.24, -39.44, 1000.59))
		{
                if(PlayerInfo[playerid][pDonator] >= 3)
			ShowPlayerDialogEx(playerid, DONATORLOCKER, DIALOG_STYLE_LIST, "VIP Locker", "First Aid Kit\nFull Vest\nSpas-12\nMP5\nM4\nAK\nSniper Rifle\nSawnOff\nShotgun\nDeagle ", "OK", "Cancel");
		}
		else
		{
			SendClientMessage(playerid, COLOR_WHITE, "You're not in range of your VIP lockers.");
		}
	}





Re: Help me Please! - Beckett - 03.02.2014

You didnt open and close brackets when you started the IF statement.
Код:
CMD:viplocker(playerid, params[])
{
	if(IsPlayerInRangeOfPoint(playerid,3,754.24, -39.44, 1000.59))
	{
		if(PlayerInfo[playerid][pDonator] >= 3) // < This
		{
			ShowPlayerDialog(playerid, DONATORLOCKER, DIALOG_STYLE_LIST, "VIP Locker", "First Aid Kit\nFull Vest\nSpas-12\nMP5\nM4\nAK\nSniper Rifle\nSawnOff\nShotgun\nDeagle ", "OK", "Cancel");
		} else { SendClientMessage(playerid,COLOR_WHITE,"** You are not a level 3 Donator."); }
	} 
	else
	{
				SendClientMessage(playerid, COLOR_WHITE, "You're not in range of your VIP lockers.");
	}
}



Re: Help me Please! - lizter008 - 03.02.2014

Can you fix this for me ? Please give me the complete code !
Thanks !


Re: Help me Please! - Beckett - 03.02.2014

I gave you the code already.


Re: Help me Please! - lizter008 - 03.02.2014




Re: Help me Please! - BroZeus - 03.02.2014

Can u show us code where u sendcilentmessage(playerid,-1, "Command does not exist........");


Re: Help me Please! - lizter008 - 03.02.2014

Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
	if(!success) SendClientMessage(playerid, COLOR_WHITE, "That command does not exist. Use /help to see the commands.");
	return 1;
}



Re: Help me Please! - iZN - 03.02.2014

pawn Код:
CMD:viplocker(playerid)
{
    if(PlayerInfo[playerid][pDonator] >= 3)
        return SendClientMessage(playerid,COLOR_WHITE,"** You are not a level 3 Donator."), true;

    if(IsPlayerInRangeOfPoint(playerid,3,754.24, -39.44, 1000.59))
        return SendClientMessage(playerid, COLOR_WHITE, "You're not in range of your VIP lockers."), true;

    ShowPlayerDialog(playerid, DONATORLOCKER, DIALOG_STYLE_LIST, "VIP Locker", "First Aid Kit\nFull Vest\nSpas-12\nMP5\nM4\nAK\nSniper Rifle\nSawnOff\nShotgun\nDeagle ", "OK", "Cancel");
    return true;
}



Re: Help me Please! - PowerPC603 - 03.02.2014

Quote:
Originally Posted by lizter008
Посмотреть сообщение
Код:
CMD:viplocker(playerid, params[])
{
		if(IsPlayerInRangeOfPoint(playerid,3,754.24, -39.44, 1000.59))
		{
                if(PlayerInfo[playerid][pDonator] >= 3)
			ShowPlayerDialogEx(playerid, DONATORLOCKER, DIALOG_STYLE_LIST, "VIP Locker", "First Aid Kit\nFull Vest\nSpas-12\nMP5\nM4\nAK\nSniper Rifle\nSawnOff\nShotgun\nDeagle ", "OK", "Cancel");
		}
		else
		{
			SendClientMessage(playerid, COLOR_WHITE, "You're not in range of your VIP lockers.");
		}
	}
pawn Код:
CMD:viplocker(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid,3,754.24, -39.44, 1000.59))
    {
        if(PlayerInfo[playerid][pDonator] >= 3)
            ShowPlayerDialogEx(playerid, DONATORLOCKER, DIALOG_STYLE_LIST, "VIP Locker", "First Aid Kit\nFull Vest\nSpas-12\nMP5\nM4\nAK\nSniper Rifle\nSawnOff\nShotgun\nDeagle ", "OK", "Cancel");
    }
    else
        SendClientMessage(playerid, COLOR_WHITE, "You're not in range of your VIP lockers.");

    return 1; // You forgot this
}
You forgot to "return 1;" at the end of your command.