14.10.2012, 09:41
Hi!
I've got a little problem with my spikestrip function.
When I type /spike, the strip doesn't appear.
The stock function:
The enum:
The command:
I've got a little problem with my spikestrip function.
When I type /spike, the strip doesn't appear.
The stock function:
pawn Код:
stock CreateStrip(Float:x,Float:y,Float:z,Float:Angle)
{
for(new i = 0; i < sizeof(SpikeInfo); i++)
{
if(SpikeInfo[i][sCreated] == 1)
{
SpikeInfo[i][sCreated]=1;
SpikeInfo[i][sX]=x;
SpikeInfo[i][sY]=y;
SpikeInfo[i][sZ]=z-0.7;
SpikeInfo[i][sObject] = CreateObject(2892, x, y, z-0.9, 0, 0, Angle-90);
return 1;
}
}
return 0;
}
pawn Код:
enum zsInfo
{
sCreated,
Float:sX,
Float:sY,
Float:sZ,
sObject,
};
new SpikeInfo[MAX_SPIKESTRIPS][zsInfo];
encode_tires(tires1, tires2, tires3, tires4) {
return tires1 | (tires2 << 1) | (tires3 << 2) | (tires4 << 3);
}
pawn Код:
CMD:spike(playerid, params[])
{
new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
GetPlayerPos(playerid, plocx, plocy, plocz);
GetPlayerFacingAngle(playerid,ploca);
CreateStrip(plocx,plocy,plocz,ploca);
return 1;
}

