SA-MP Forums Archive
OnPlayerEnterDynamicCircle Not Working help rep + - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: OnPlayerEnterDynamicCircle Not Working help rep + (/showthread.php?tid=466097)



OnPlayerEnterDynamicCircle Not Working help rep + - Fitri - 25.09.2013

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


Re: OnPlayerEnterDynamicCircle Not Working help rep + - Fitri - 26.09.2013

help ?


Re: OnPlayerEnterDynamicCircle Not Working help rep + - CrossWindGaming - 26.09.2013

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


Re: OnPlayerEnterDynamicCircle Not Working help rep + - iZN - 26.09.2013

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);



Re: OnPlayerEnterDynamicCircle Not Working help rep + - Fitri - 08.10.2013

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