Teleport - 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)
+--- Thread: Teleport (
/showthread.php?tid=661819)
Teleport -
SeeNN - 15.12.2018
I have a question,how can I make someone to can't teleport into a gang zone?
If the script is needed:
Код HTML:
public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
{
if(CosminInfo[playerid][pVIP] == 10)
{
SetPlayerPosFindZ(playerid, fX, fY, fZ);
GameTextForPlayer(playerid, "~w~~h~You have been ~n~ ~g~~h~Teleported ~n~ ~r~~h~To the location!", 4000, 3);
}
if(CosminInfo[playerid][pVIP] == 10)
{
if(GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, Float:fX, Float:fY, Float:fZ);
GameTextForPlayer(playerid, "~w~~h~You have been ~n~ ~g~~h~Teleported ~n~ ~r~~h~To the location!", 4000, 3);
}
}
return 1;
}
Re: Teleport -
Mugala - 16.12.2018
you have to check if the given coordinates (fX,fY,fZ) is in a gang zone.
you can do it same as player's coordinates, when you're checking to start a gangwar or something like that.
Re: Teleport -
SeeNN - 16.12.2018
Quote:
Originally Posted by Mugala
you have to check if the given coordinates (fX,fY,fZ) is in a gang zone.
you can do it same as player's coordinates, when you're checking to start a gangwar or something like that.
|
So,If I try to change "fX, fY, fZ" with, ex: "fX1, fY1, fZ" will work?