Spikestrip not popping your tires
#1

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

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

I'll check it out in a min.
Reply
#4

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


Forum Jump:


Users browsing this thread: 1 Guest(s)