SA-MP Forums Archive
Spikestrip not popping your tires - 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: Spikestrip not popping your tires (/showthread.php?tid=163663)



Spikestrip not popping your tires - Rubennnnn - 28.07.2010

Hi there,

I got a little problem with my script.
When you drive over the spikestrip, your tires don't pop.
What's wrong?

pawn Код:
if(strcmp(cmd, "/ss", true) == 0 || strcmp(cmd, "/spikestrip", true) == 0)
    {
        if(gTeam[playerid] == TEAM_COP && PlayerInfo[playerid][pRank] == 1)
        {
            if(RoadblockUsed[playerid] == 0)
            {
                new Float:x, Float:y, Float:z, Float:a;
                GetPlayerPos(playerid, x, y, z);
                GetPlayerFacingAngle(playerid, a);
                PlayerRoadblock[playerid] = CreateObject(2892, x, y, z-0.6, 0.0, 0.0, a+90.0);
                SendClientMessage(playerid, COLOR_YELLOW,"Spike-strip has been created on this location.");
                format(string, sizeof(string), "Officer %s: I have deployed a spike-strip, Over.", PlayerName[playerid]);
                SendTeamMessage(TEAM_COP, COLOR_BLUE, string);
                RoadblockUsed[playerid] = 1;
            }
            else
            {
                SendClientMessage(playerid, COLOR_RED,"You have already created a spike-strip, use /rss to delete it.");
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_RED,"You are not a part of the cops team.");
        }
        return 1;
    }

    if(strcmp(cmd, "/rss", true) == 0 || strcmp(cmd, "/removespikestrip", true) == 0)
    {
        if(gTeam[playerid] == TEAM_COP && PlayerInfo[playerid][pRank] == 1)
        {
            if(RoadblockUsed[playerid] == 1)
            {
                DestroyObject(PlayerRoadblock[playerid]);
                SendClientMessage(playerid, COLOR_YELLOW,"You have successfully removed your spike-strip.");
                RoadblockUsed[playerid] = 0;
            }
            else
            {
                SendClientMessage(playerid, COLOR_RED,"You cannot remove your spike-strip because you don't have one.");
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_RED,"You are not a part of the cops team.");
        }
        return 1;
    }



Re: Spikestrip not popping your tires - Agent Smith - 28.07.2010

The object itself can't pop the tire but there is an .inc for it somewhere.

EDIT:

http://forum.sa-mp.com/showthread.ph...ht=spike+strip


Re: Spikestrip not popping your tires - Rubennnnn - 28.07.2010

I'll check it out in a min.


Re: Spikestrip not popping your tires - WackoX - 28.07.2010

Lol this is my gamemode, this command was made before 0.3a, it's just an object dude.