Deathmatch Zone - 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: Deathmatch Zone (
/showthread.php?tid=82636)
Deathmatch Zone -
joeri55 - 19.06.2009
Hello,
I've got a question.
When I am at the left side of bank it still says I need to be at the left side of the bank?
http://pastebin.com/m1c3c876e
Re: Deathmatch Zone -
dice7 - 19.06.2009
https://sampwiki.blast.hk/wiki/SetPlayerWorldBounds
Re: Deathmatch Zone -
joeri55 - 19.06.2009
It's not about worldbounts.
It's about the testdistance thing. How can I make that only people can teleport to the DM Zone if there are near bank?
Re: Deathmatch Zone -
dice7 - 19.06.2009
And what is your TestDistance ?
Re: Deathmatch Zone -
joeri55 - 19.06.2009
Look into the pastebin file there is the TestDistance command.
And this are my cordz.
1507.6707,-1750.5477,13.5469
Re: Deathmatch Zone -
dice7 - 19.06.2009
What is the source of the function "TestDistance"
Re: Deathmatch Zone -
joeri55 - 19.06.2009
pawn Код:
public TestDistance(playerid,giveplayerid,Float:tarx,Float:tary,Float:tarz,Float:radi)
{
if (gdebug >= 3){printf("DEBUG TestDistance()");}
new Float:posx, Float:posy, Float:posz;
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
//radi = 2.0; //Trigger Radius
GetPlayerPos(giveplayerid, posx, posy, posz);
tempposx = (tarx -oldposx);
tempposy = (tary -oldposy);
tempposz = (tarz -oldposz);
//printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
if (gdebug >= 2){printf("DEBUG TestDistance2()");}
tempposx = (tarx -posx);
tempposy = (tary -posy);
tempposz = (tarz -posz);
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
if (gdebug >= 2){printf("DEBUG TestDistance3()");}
return 1;
}
}
else
{
return 0;
}
return 0;
}
Re: Deathmatch Zone -
joeri55 - 20.06.2009
Can anyone help?