SA-MP Forums Archive
The script is Right yet it dont work - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: The script is Right yet it dont work (/showthread.php?tid=123834)



The script is Right yet it dont work - braduz - 27.01.2010

Код:
SetTimerEx("tele1", 100, true, "i");
^^^^^ I ADDED TO "ONGAMEMODEINIT" SO THAT MIGHT be the problem...
and

Код:
public tele1(playerid)
{
 if(IsPlayerInRangeOfPoint(playerid, 7.0, 256.5103,1802.0255,7.5278))
  {
 SetPlayerPos(playerid,2543.3181,-1306.0562,1025.0703);
 SetPlayerInterior( playerid, 2 );
}
	  return 1;
}
dont work, i cant see why!


Re: The script is Right yet it dont work - ~Dangun! - 27.01.2010

maybe use this.
Код:
if(IsPlayerInArea(playerid, 1341.555, -2724.066, 2174.376, -2199.016))



Re: The script is Right yet it dont work - Correlli - 27.01.2010

Maybe learn how and where to use the SetTimerEx function.


Re: The script is Right yet it dont work - braduz - 27.01.2010

Quote:
Originally Posted by ~Dangun!
maybe use this.
Код:
if(IsPlayerInArea(playerid, 1341.555, -2724.066, 2174.376, -2199.016))
undefined symbol


Re: The script is Right yet it dont work - MenaceX^ - 27.01.2010

Quote:
Originally Posted by Don Correlli
Maybe learn how and where to use the SetTimerEx function.
+1

Change this:
pawn Код:
SetTimerEx("tele1", 100, true, "i");
To this:
pawn Код:
SetTimerEx("tele1", 100, true, "i",playerid);



Re: The script is Right yet it dont work - lameguy - 27.01.2010

pawn Код:
SetTimer("tele1", 100, 1);
pawn Код:
forward tele1(playerid);
public tele1(playerid)
{
  for(new i=0; i < MAX_PLAYERS; i++)
  {
     if(IsPlayerInRangeOfPoint(i, 7.0, 256.5103,1802.0255,7.5278))
     {
        SetPlayerPos(i,2543.3181,-1306.0562,1025.0703);
        SetPlayerInterior(i, 2);  
     }
  }
}



Re: The script is Right yet it dont work - braduz - 27.01.2010

Quote:
Originally Posted by Johnson_boy
pawn Код:
SetTimer("tele1", 100, 1);
pawn Код:
forward tele1(playerid);
public tele1(playerid)
{
  for(new i=0; i < MAX_PLAYERS; i++)
  {
     if(IsPlayerInRangeOfPoint(i, 7.0, 256.5103,1802.0255,7.5278))
     {
        SetPlayerPos(i,2543.3181,-1306.0562,1025.0703);
        SetPlayerInterior(i, 2);  
     }
  }
}
testing it.......


Re: The script is Right yet it dont work - Correlli - 27.01.2010

Quote:
Originally Posted by Johnson_boy
pawn Код:
SetTimer("tele1", 100, 1);
pawn Код:
forward tele1(playerid);
public tele1(playerid)
{
  for(new i=0; i < MAX_PLAYERS; i++)
  {
     if(IsPlayerInRangeOfPoint(i, 7.0, 256.5103,1802.0255,7.5278))
     {
        SetPlayerPos(i,2543.3181,-1306.0562,1025.0703);
        SetPlayerInterior(i, 2);  
     }
  }
}
Use SetTimerEx function but like i said already: learn how and where to use it, check the wiki page.


Re: The script is Right yet it dont work - braduz - 27.01.2010

Quote:
Originally Posted by Johnson_boy
pawn Код:
SetTimer("tele1", 100, 1);
pawn Код:
forward tele1(playerid);
public tele1(playerid)
{
  for(new i=0; i < MAX_PLAYERS; i++)
  {
     if(IsPlayerInRangeOfPoint(i, 7.0, 256.5103,1802.0255,7.5278))
     {
        SetPlayerPos(i,2543.3181,-1306.0562,1025.0703);
        SetPlayerInterior(i, 2);  
     }
  }
}
thanks!


Re: The script is Right yet it dont work - Correlli - 27.01.2010

There's a needless playerid param in the function.