SA-MP Forums Archive
Destroyspikes - 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: Destroyspikes (/showthread.php?tid=466174)



Destroyspikes - Blademaster680 - 26.09.2013

Hi guys.

I have a problem with 2 of my commands. I can deploy spikes and baracades and I cant destroy them.

Код:
CMD:deployspike(playerid, params[])
{
	new str[126], zone[126];
	if(PlayerInfo[playerid][pFaction] != 1 && PlayerInfo[playerid][pFaction] != 2) return SendClientMessage(playerid, -1, "You are not a Law Enforcement Officer.");
	new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
 	GetPlayerPos(playerid, plocx, plocy, plocz);
  	GetPlayerFacingAngle(playerid,ploca);
   	CreateStrip(plocx,plocy,plocz,ploca);
   	GetPlayer3DZone(playerid, zone, sizeof(zone));
	format(str, sizeof(str), "* %s %s has deployed a spike strip at %s.", GetRankName(playerid),      GetName(playerid), zone);
	SendClientMessageToLSPD(RADIO, str);
	SendClientMessageToFBI(RADIO, str);
    return 1;
}

CMD:destroyspike(playerid, params[])
{
	if(PlayerInfo[playerid][pFaction] != 1 && PlayerInfo[playerid][pFaction] != 2) return SendClientMessage(playerid, -1, "You are not a Law Enforcement Officer.");
	DeleteClosestStrip(playerid);
	return 1;
}

CMD:destroyspikes(playerid, params[])
{
    new str[126];
	if(PlayerInfo[playerid][pFaction] != 1 && PlayerInfo[playerid][pFaction] != 2) return SendClientMessage(playerid, -1, "You are not a Law Enforcement Officer.");
	format(str, sizeof(str), "* %s %s has picked up all spike strips.", GetRankName(playerid), GetName(playerid));
	SendClientMessageToLSPD(RADIO, str);
	SendClientMessageToFBI(RADIO, str);
 	DeleteAllStrip();
 	return 1;
}
It sends the client message to the radio's but it doesnt destroy the spikes.
It disables them so they dont pop your tires once you destroy them. But the problem is they dont vanish

Please help


Re: Destroyspikes - Misiur - 26.09.2013

You didn't include DeleteClosestStrip, so we can't tell what's wrong


Re: Destroyspikes - zT KiNgKoNg - 26.09.2013

If i'm looking at this correctly he's actually using a include witch is on the forums.