Few Questions. - 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: Few Questions. (
/showthread.php?tid=70707)
Few Questions. -
FrazZ - 26.03.2009
1. If I wanted to change a spawnplace what would I have to search or where would I have to look?
2. Redshirt's Map Editor always screws me analy on the rotations. Is theyre anyway to fix this?
(EX: Its X=18.00 and all of a sudden its X rotation becomes 180.00
3. Anyone know how to make a marker automatically tele you without typing in /enter?
Dont tell me to search. I have. Dont tell me to look at the wiki. I have. Please dont argue and scream your ass off saying its easy for you and I am a total douche at scripting. True, but please don't repeat lol
Re: Few Questions. -
Pixels^ - 27.03.2009
You didn't search hard enough.
3. I typed in "checkpoint teleport" and holy shit, stuff popped up. Is it a phenomenon? No, I just searched.
http://forum.sa-mp.com/index.php?topic=91648.0
http://forum.sa-mp.com/index.php?topic=90093.0
http://forum.sa-mp.com/index.php?top...9579#msg449579
http://forum.sa-mp.com/index.php?topic=44743.0
http://forum.sa-mp.com/index.php?topic=85941.0
That's not even half.
Re: Few Questions. -
FrazZ - 27.03.2009
Yes, I forgot to put down I searched for the checkpoints. Thanks in advance!
Any other things of the other stuff I typed?
Re: Few Questions. -
zanakinz - 27.03.2009
Frazz If you dont want to do /enter then just do if playertopoint or pointtopointstripped i think i'll give a code of both
Код:
//forwards
forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
forward PlayerToPointStripped(Float:radi, playerid, Float:x, Float:y, Float:z, Float:curx, Float:cury, Float:curz);
//In action (how it looks normally)
if (PlayerToPoint(25.0,playerid,XXXX,YYYY,ZZZZ)
if (PlayerToPointStripped(1.5, playerid,XXXX,YYYY,ZZZZ, cx,cy,cz))
Код:
//publics
public PlayerToPointStripped(Float:radi, playerid, Float:x, Float:y, Float:z, Float:curx, Float:cury, Float:curz)
{
if(IsPlayerConnected(playerid))
{
new Float:tempposx, Float:tempposy, Float:tempposz;
tempposx = (curx -x);
tempposy = (cury -y);
tempposz = (curz -z);
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) return 1;
}
return 0;
}
//PlayerToPoint
public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
if(IsPlayerConnected(playerid))
{
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
tempposx = (oldposx -x);
tempposy = (oldposy -y);
tempposz = (oldposz -z);
//printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
return 1;
}
}
return 0;
}
If you ever need more info use Wiki
Here
Hope i helped
Re: Few Questions. -
FrazZ - 27.03.2009
I told youy I used wiki. Although, thanks.
Re: Few Questions. -
zanakinz - 27.03.2009
Sorry i didnt read that part but i was just indicating that you could use Wiki for further purposes not that you needed to. Sorry for the misunderstanding
Re: Few Questions. -
FrazZ - 29.03.2009
No dont get me wrong, its alright