05.04.2010, 05:55
Hey there.
I am using Godfather and I think I have a problem with my enums.
Now when I try using this function:
Nothing happens, I can see the message but it didn't really change the cordinations.
It happens only in this script and I don't know even why. I tried it on LVDM and it worked perfectly.
Is there something that might affect in the Godfather script?
I am using Godfather and I think I have a problem with my enums.
pawn Код:
#define MAX_SPIKESTRIPS 50
pawn Код:
enum sInfo
{
sCreated,
Float:sX,
Float:sY,
Float:sZ,
sObject,
};
new SpikeInfo[MAX_SPIKESTRIPS][sInfo];
pawn Код:
if (strcmp(cmd,"/createstrip",true) == 0)
{
new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
GetPlayerPos(playerid, plocx, plocy, plocz);
GetPlayerFacingAngle(playerid,ploca);
CreateStrip(plocx,plocy,plocz,ploca);
SendClientMessage(playerid, COLOR_WHITE, "You have created a spike!");
return 1;
}
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;
}
It happens only in this script and I don't know even why. I tried it on LVDM and it worked perfectly.
Is there something that might affect in the Godfather script?