SA-MP Forums Archive
Deployflare help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Deployflare help (/showthread.php?tid=557199)



Deployflare help - tboysamp - 13.01.2015


I just need help with geting the flare lower to the ground I have tried everything
Код:
CMD:deployflare(playerid, params[])
{
	if (GetFactionType(playerid) != FACTION_POLICE)
	    return SendErrorMessage(playerid, "You are not a police officer.");

    new Float:playerPos[3];
    GetPlayerPos(playerid, playerPos[0], playerPos[1], playerPos[2]);
    ApplyAnimation(playerid, "BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0,1); // Plant bomb
    if(FindEmptySlot1() == -1) return SendClientMessage(playerid, COLOR_WHITE, "The flare limit (10) has been reached, please delete some flares using /destroyflare <1-10>");
    SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, "** %s has successfully placed a flare! (ID: %i).", ReturnName(playerid, 0), FindEmptySlot1() + 1);
    PlantedFlares[FindEmptySlot1()] = CreateDynamicObject(18728, playerPos[0], playerPos[1], playerPos[2] - 1, 0, 0, 0);
	return 1;
}



Re: Deployflare help - Steven82 - 13.01.2015

Subtract values from the "Z" coordinate until you feel it's low enough. I see you've already done that, did it do anything as far as moving it?

I don't know how much help I'll be, it's been awhile since I've played/scripted--just getting back into stuff/remembering.


Re: Deployflare help - tboysamp - 13.01.2015

no it did not work