OnPlayerEnterDynamicCircle Not Working help rep +
#1

pawn Код:
stock loadgates()
{
 new fail[256];
 for(new i; i <MAX_GATES; i++)
 {
  format(fail,sizeof(fail),gatepath,i);
  if(fexist(fail))
   {
    GateInfo[i][area] = CreateDynamicCircle(GateInfo[i][xx],GateInfo[i][yy],5, -1, -1, -1);
    INI_ParseFile(fail, "gate_data", .bExtra = true, .extra = i);
    GateInfo[i][gates] = CreateDynamicObject(980,GateInfo[i][xx],GateInfo[i][yy],GateInfo[i][zz],GateInfo[i][rxx],GateInfo[i][ryy],GateInfo[i][rzz]);
    new text[300];
    format(text,sizeof(text),"Autogate \nID = %d",GateInfo[i][id]);
    GateInfo[i][label] = CreateDynamic3DTextLabel(text,0x8000FFFF,GateInfo[i][xx],GateInfo[i][yy],GateInfo[i][zz],40);
   }
 }
 return 1;
}
pawn Код:
public OnPlayerEnterDynamicArea(playerid, areaid)
{
 for(new i; i < MAX_GATES; i++)
  {
   if(areaid == GateInfo[i][area] )
    {
      MoveDynamicObject(GateInfo[i][gates],GateInfo[i][xx],GateInfo[i][yy],GateInfo[i][zz]+5,2);
    }
  }
 return 1;
}


public OnPlayerLeaveDynamicArea(playerid, areaid)
{
 for(new i; i < MAX_GATES; i++)
  {
   if(areaid == GateInfo[i][area] )
    {
      MoveDynamicObject(GateInfo[i][gates],GateInfo[i][xx],GateInfo[i][yy],GateInfo[i][zz],2);
    }
  }
 return 1;
}
help
Reply
#2

help ?
Reply
#3

Im not sure about CreateDyanmicCircle. I have only heard about SetPlayerCheckpoint or even CreateDynamicCheckpoint. Might wanna ****** some alternatives if this isnt in an include
Reply
#4

Why are you using -1 if it's done by default.
Change this to
pawn Код:
GateInfo[i][area] = CreateDynamicCircle(GateInfo[i][xx],GateInfo[i][yy],5, -1, -1, -1);
to this:
pawn Код:
GateInfo[i][area] = CreateDynamicCircle(GateInfo[i][xx],GateInfo[i][yy],5);
Reply
#5

Quote:
Originally Posted by iZN
Посмотреть сообщение
Why are you using -1 if it's done by default.
Change this to
pawn Код:
GateInfo[i][area] = CreateDynamicCircle(GateInfo[i][xx],GateInfo[i][yy],5, -1, -1, -1);
to this:
pawn Код:
GateInfo[i][area] = CreateDynamicCircle(GateInfo[i][xx],GateInfo[i][yy],5);
-1 its all world, player, interior
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)