SA-MP Forums Archive
Spike bug? How to fix? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Spike bug? How to fix? (/showthread.php?tid=224198)



Spike bug? How to fix? - Unknown123 - 11.02.2011

SOLVED thanks to xxmitsu


Re: Spike bug? How to fix? - xxmitsu - 11.02.2011

See if this code works:
pawn Code:
dcmd_deletespike(playerid, params[])
{
    #pragma unused params
    if(gTeam[playerid] == TEAM_SWAT || IsPlayerAdmin(playerid))
    {
        if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_ERROR, "You cannot remove the spike(s) inside a vehicle");
        if(DeleteClosestStrip(playerid)) SendClientMessage(playerid, COLOR_GREEN, "Spike Removed");
        else SendClientMessage(playerid, COLOR_ERROR, "There is no spikes close to you");
    }
    return 1;
}



Re: Spike bug? How to fix? - Unknown123 - 11.02.2011

Thank You