08.03.2015, 15:49
Here you go:
pawn Код:
#define viplocker_dialog 1990
CMD:viplocker(playerid, params[])
{
if(CanUseLocker[playerid]==false) return SendClientMessage(playerid, COLOR_WHITE, "You have to wait before using locker again.");
if(PlayerInfo[playerid][pDonator] >= 1)
{
if(IsPlayerInRangeOfPoint(playerid,3,-2653.1226, 1410.2570 ,906.2734))
{
ShowPlayerDialogEx(playerid, viplocker_dialog, DIALOG_STYLE_LIST, "VIP Locker", "Health\nArmour\nDeagle", "Select", "Cancel");
VipLockerTimer[playerid] = SetTimerEx("VipLockerTime", 3600*1000, false, "i", playerid);
CanUseLocker[playerid] = false;
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "You arent in correct place.");
}
}
return 1;
}
forward VipLockerTime(playerid);
public VipLockerTime(playerid)
{
CanUseLocker[playerid] = true;
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == viplocker_dialog)
{
if(response)
{
if(listitem == 0)
{
SetPlayerHealth(playerid, 100.0);
SendClientMessage(playerid, 0xFFFFFF, "You have bought health!");
}
if(listitem == 1)
{
SetPlayerArmour(playerid, 100.0);
SendClientMessage(playerid, 0xFFFFFF, "You have bought armour!");
}
if(listitem == 2)
{
GivePlayerWeapon(playerid, 24, 500);
SendClientMessage(playerid, 0xFFFFFF, "You have bought a Desert Eagle!");
}
}
}
return 1;
}