Szerző Téma: PlayerToPoint  (Megtekintve 872 alkalommal)

Depi

  • Vendég
PlayerToPoint
« Dátum: 2009. December 08. - 20:30:40 »
0 Show voters
Hy all Eps TuTja alapján csináltam egy automatikusan nyitodó/zárodó kaput,csak h nem müködik mi a baj :
 
#include <a_samp>
#if defined FILTERSCRIPT
forward OpenGate(playerid);
public OnFilterScriptInit()
{
print(\"\\n--------------------------------------\");
print(\" Blank Filterscript by your name here\");
print(\"--------------------------------------\\n\");
CreateObject(980, 2036.322754, 1010.334351, 12.593704, 0.0000, 0.0000, 270.0000);
SetTimer(\"OpenGate\",700, 1);
return 1;
}
public OpenGate(playerid)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
    if(PlayerToPoint(3, playerid, 2034.5461,1009.8738,10.8203))
{
   MoveObject(Gate, 2036.368164, 1010.330139, 6.776847, 3);
}
else
{
   MoveObject(Gate, 2036.322754, 1010.334351, 12.593704, 3);
}
}
}
stock PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z) return IsPlayerInRangeOfPoint(playerid,radi,x,y,z);
#endif

 
Kérlek segítsettek fontos lenne.
ELore is kösz.

Nem elérhető ZeRo

  • 4620
  • Ex Globális Moderátor
    • Profil megtekintése
PlayerToPoint
« Válasz #1 Dátum: 2009. December 08. - 20:47:18 »
0 Show voters
Az egész szkript egy olyan direktíva után van, ami nem teljesül, magyarul a szkript nem is fog lefutni. Töröld ki az \'#if defined FILTERSCRIPT\' direktívát, és az \'#endif\' direktívát.
Ezenkívül, ha az OpenGate függvényben ciklust indítasz, akkor használd is.
 
if(PlayerToPoint(3, i, 2034.5461,1009.8738,10.8203))

 
ZeRo

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal