10.10.2013, 16:01
Try this
pawn Код:
COMMAND:pickupmaterials(playerid, params[])
{
if(IsDrugger[playerid] == 1)
{
if(HasMaterials[playerid] == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 1.0, 2067.4619,-1561.9774,13.4270))
{
ApplyAnimation(playerid,"PED","SPECIAL_ACTION_CARRY",4.1,1,1,1,1,1,1);
SetTimer("pickingmaterials", 5000, false);
SendClientMessage(playerid, lightblue, "You started loading part of drugs materials.");
TogglePlayerControllable(playerid, 0);
}
else
SendClientMessage(playerid, red, "[ERROR] You're not at the materials pickup position.");
}
else SendClientMessage(playerid, red, "[ERROR] You can only load 1 pack of materials at one time.");
}
else SendClientMessage(playerid, red, "[ERROR] You're not a Drugger.");
}