here to put this ? - 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: here to put this ? (
/showthread.php?tid=161159)
here to put this ? -
Rocky Balboa - 19.07.2010
look i made this , where do i put this ?
forward Tele(playerid);
public Tele(playerid)
{
if(tele[playerid] == 1)
{
if(PlayerAtPos(playerid,546,456.6,466)
{
SetPlayerPos(playerid,54645,64564,56.6);
SendClientMessage(playerid,0x045BBAA,"You have gone to the stadium");
}
}
return 1;
}
PROBLEMS:
And those are some fake numbers .. but the rest is good ... and PlayerAtPos i made that myself ..... now if i put this at onplayerupdate Tele(playerid); , the message box goes crazy ! it says you have gone to hte stadium milions of times ... so where do i put it ?and i tried to not place it anywhere .. and it didnt work .. and i put this as a time for 1 second at ongamemode init and hte message box went crazy again.And where do i put this ?
Re: here to put this ? - [L3th4l] - 19.07.2010
a public you do not put it under another public. add it OUTSIDE
Re: here to put this ? -
Venturas - 19.07.2010
PlayAtPos why not just use IsPlayerInRangeOfPoint or PlayerToPoint..?
Re: here to put this ? -
Rocky Balboa - 19.07.2010
Quote:
Originally Posted by [L3th4l]
a public you do not put it under another public. add it OUTSIDE
|
i didnt do taht .. i did this
public OnPlayerUpdate(playerid)
{
Tele(playerid);
}
thats what i did .. i didnt put the entire thing inside a public
Re: here to put this ? -
Rocky Balboa - 19.07.2010
Quote:
Originally Posted by Venturas
PlayAtPos why not just use IsPlayerInRangeOfPoint or PlayerToPoint..?
|
i made that myself , thats why i am using that
Re: where to put this funciton ?? -
Rocky Balboa - 19.07.2010
so any suggestions ?
Re: here to put this ? -
[HiC]TheKiller - 19.07.2010
Bottom of your script outside other functions.
Re: here to put this ? -
ikey07 - 19.07.2010
SetPlayerPos(playerid,54645,64564,56.6);
what is these coords, omg, your stadium is it on moon?
Re: here to put this ? -
Rocky Balboa - 19.07.2010
Quote:
Originally Posted by [HiC]TheKiller
Bottom of your script outside other functions.
|
What do you mean ?
Re: here to put this ? -
AiVAMAN - 19.07.2010
you have to use this only when you need it. Set timer to check player pos, then if PlayerAtPos, set his pos to another. Hope you understand me. :