02.10.2012, 07:50
pawn Код:
CMD:lvpd(playerid, params[])
{
if(PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14)
{
if (IsPlayerInRangeOfPoint(playerid, 10.0, 244.131195, 190.252990, 1008.171875))
{
ShowPlayerDialog(playerid, DIALOG_LVPD, DIALOG_STYLE_LIST, "Loker LVPD","Kerja\nPeralatan\nPakaian", "Pilih", "Batal");
}
else
{
SendClientMessageEx(playerid, COLOR_WHITE, "Kamu tidak sedang berada dekat dengan Locker LVPD.");
}
}
return 1;
}
pawn Код:
if(dialogid == DIALOG_LVPD)
{
if(response)
{
switch(listitem)
{
case 0:
{
if(PlayerInfo[playerid][pDuty] == 1)
{
format(string, sizeof(string), "* %s menyimpan badge dan peralatan kerjanya ke Loker.",GetPlayerNameEx(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
ResetPlayerWeaponsEx(playerid);
OnDuty[playerid] = 0;
PlayerInfo[playerid][pDuty] = 0;
SetPlayerColor(playerid, TEAM_HIT_COLOR);
SetPlayerArmour(playerid, 0.0);
}
else
{
format(string, sizeof(string), "* %s mengambil badge beserta peralatan kerja di Loker.",GetPlayerNameEx(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetPlayerColor(playerid, COLOR_LVPD);
SetPlayerArmour(playerid, 100.0);
GivePlayerValidWeapon(playerid, 24, 99999);
GivePlayerValidWeapon(playerid, 25, 99999);
GivePlayerValidWeapon(playerid, 3, 99999);
GivePlayerValidWeapon(playerid, 41, 99999);
OnDuty[playerid] = 1;
PlayerInfo[playerid][pDuty] = 1;
}
}
case 1:
{
ShowPlayerDialog(playerid, DIALOG_LVPD_WEAPONS, DIALOG_STYLE_LIST, "Peralatan LVPD", "Mace\nStick\nDE\nCombat Shotgun\nMP5\nM4A1\nAK-47\nBomb Asap\nShotgun\nRifle\nSniper\nArmor\nK3\nAksesoris", "Pilih", "Batal");
}
case 2:
{
ShowPlayerDialog(playerid, DIALOG_LVPD_CLOTHING, DIALOG_STYLE_LIST, "Pakaian", "Seragam\nPakaian untuk istirahat", "Pilih", "Batal");
}
}
}
}