07.06.2012, 19:46
Give this a go:
pawn Код:
COMMAND:equip(playerid, params[])
{
if(Died[playerid] == 1)
{
SendClientMessage(playerid, COLOR_WHITE, "Cannot use this command while dead.");
}
else
{
if(PlayerInfo[playerid][pFaction] == 1) // LSPD
{
if(PlayerToPoint(2.5,playerid,233.4385,122.4045,1003.2188))
{
ShowPlayerDialog(playerid, 112, DIALOG_STYLE_LIST, "Equipment Locker", "Night Stick\nPepper Spray\nDesert Eagle\nMP5\nKnife\nShotgun\nM4A1\nSniper Rifle\nCamera\nParachute\nKevlar & Helmet\n Put equipment back", "Equip", "Cancel");
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "WARNING: You are not at the docks.");
}
}
else if(PlayerInfo[playerid][pFaction] == 2) // EMS
{
if(PlayerToPoint(2.5,playerid,MedicDutyPosition[X],MedicDutyPosition[Y],MedicDutyPosition[Z]))
{
ShowPlayerDialog(playerid, 113, DIALOG_STYLE_LIST, "Equipment Locker", "Fire Extinguisher\nShovel", "Equip", "Cancel");
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "WARNING: You are not at the docks.");
}
}
else if(PlayerInfo[playerid][pFaction] == 0) // Sheriff
{
if(PlayerToPoint(2.5,playerid,PoliceDutyPosition[X],PoliceDutyPosition[Y],PoliceDutyPosition[Z]))
{
ShowPlayerDialog(playerid, 112, DIALOG_STYLE_LIST, "Equipment Locker", "Night Stick\nPepper Spray\nDesert Eagle\nMP5\nKnife\nShotgun\nM4A1\nSniper Rifle\nCamera\nParachute\n Put equipment back", "Equip", "Cancel");
return 1;
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "WARNING: You are not at the docks.");
}
}
}
return 1;
}