Destroyspikes
#1

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
Reply
#2

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)