Creating Spike Strips problem.
#1

So I have a /deployspikes command, everything works fine because I get the confirmation message that I've planted a Spike Strip, but it doesn't actually create and appear.

Here's the code when you do /deployspikes:
pawn Код:
new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
        GetPlayerPos(playerid,plocx,plocy,plocz);
        GetPlayerFacingAngle(playerid,ploca);
        new location[MAX_ZONE_NAME];
        GetPlayer2DZone(playerid, location, MAX_ZONE_NAME);
        new Float:x, Float:y, Float:z, Float:angle;
        GetPlayerFacingAngle(playerid, angle);
        GetPlayerPos(playerid, x, y, z);
          CreateStrip(x, y, z, angle);
        format(string, sizeof(string), "HQ: %s %s has placed a spike strip at %s",      GetPlayerRank(playerid),PlayerName(playerid), location);
        SendRadioMessage(1, TEAM_BLUE_COLOR, string);
        SendRadioMessage(2, TEAM_BLUE_COLOR, string);
        SendRadioMessage(3, TEAM_BLUE_COLOR, string);
        SendRadioMessage(5, TEAM_BLUE_COLOR, string);
        ApplyAnimation(playerid, "BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0); // Plant bomb
        GetPlayerFacingAngle(playerid,ploca);
        CreateStrip(plocx,plocy,plocz,ploca);
Here's the stock for CreateStrip:
pawn Код:
stock CreateStrip(Float:x,Float:y,Float:z,Float:Angle)
{
    for(new i = 0; i < sizeof(SpikeInfo); i++)
    {
        if(SpikeInfo[i][sCreated] == 0)
        {
            SpikeInfo[i][sCreated]=1;
            SpikeInfo[i][sX]=x;
            SpikeInfo[i][sY]=y;
            SpikeInfo[i][sZ]=z-0.7;
            SpikeInfo[i][sObject] = CreateObject(2899, x, y, z-0.9, 0, 0, Angle-90);
            return 1;
        }
    }
    return 0;
}
Reply


Messages In This Thread
Creating Spike Strips problem. - by Jack_Leslie - 17.07.2011, 07:30
Re: Creating Spike Strips problem. - by Jochemd - 17.07.2011, 07:38
Re: Creating Spike Strips problem. - by Jack_Leslie - 17.07.2011, 07:38
Re: Creating Spike Strips problem. - by Jochemd - 17.07.2011, 07:40
Re: Creating Spike Strips problem. - by Jack_Leslie - 17.07.2011, 07:41
Re: Creating Spike Strips problem. - by Jochemd - 17.07.2011, 07:43
Re: Creating Spike Strips problem. - by Jack_Leslie - 17.07.2011, 07:47
Re: Creating Spike Strips problem. - by Jochemd - 17.07.2011, 08:11
Re: Creating Spike Strips problem. - by Jack_Leslie - 17.07.2011, 08:15
Re: Creating Spike Strips problem. - by Jochemd - 17.07.2011, 08:32

Forum Jump:


Users browsing this thread: 2 Guest(s)