25.06.2012, 04:13
Try this:
You never set pAlreadyBoombox to 1.
pawn Код:
CMD:placeboombox(playerid, params[])
{
if (PlayerInfo[playerid][pAlreadyBoombox] == 1)
{
SendClientMessage(playerid, COLOR_YELLOW, "You have already placed a boombox somewhere go /pickupboombox near it.");
return 1;
}
if (PlayerInfo[playerid][pbuyBoombox] == 0)
{
SendClientMessage(playerid, COLOR_YELLOW, "You dont have a boombox - buy one from your local 24/7.");
return 1;
}
else
{
if (PlayerInfo[playerid][pbuyBoombox] == 1)
SendClientMessageEx(playerid, COLOR_YELLOW, "You have placed Boombox on the ground, /pickupboombox to remove it.");
}
GetPlayerPos(playerid,Positions[0][0], Positions[0][1], Positions[0][2]);
SetPVarFloat(playerid, "DYN_Boombox_FLOAT_X", Positions[0][0]);
SetPVarFloat(playerid, "DYN_Boombox_FLOAT_Y", Positions[0][1]);
SetPVarFloat(playerid, "DYN_Boombox_FLOAT_Z", Positions[0][2]);
PlayerInfo[playerid][pBoombox] = CreateDynamicObject(2103, Positions[0][0], Positions[0][1], Positions[0][2]-0.9, 0, 0, 3.9700012207031);
ApplyAnimation(playerid,"BOMBER","BOM_Plant",4.0,0,0,0,0,0);
ApplyAnimation(playerid,"BOMBER","BOM_Plant",4.0,0,0,0,0,0);
SendClientMessageEx(playerid, COLOR_YELLOW, "you set the station use /turnonboombox - turn off using /turnoffboombox.");
PlayerInfo[playerid][pAlreadyBoombox] = 1;
return 1;
}