CMD to teleport to A certain point by position x y z -
vikoo - 19.11.2018
i wanna to teleport to a position but idk about cmds anyone know?
Re: CMD to teleport to A certain point by position x y z -
v1k1nG - 19.11.2018
SetPlayerPos
PHP код:
CMD:teleport(playerid, params[]){
SetPlayerPos(playerid, your x y and z coordinates);
SetPlayerInterior(playerid, interior); // only if you teleport in interior, set the interior id
return 1;
}
Assuming your using zcmd or pawn.cmd
Re: CMD to teleport to A certain point by position x y z -
vikoo - 19.11.2018
i mean to teleport to this position inside the server
1480.27161, -1642.37793, 13.15613
Re: CMD to teleport to A certain point by position x y z -
vikoo - 19.11.2018
ok i will check
Re: CMD to teleport to A certain point by position x y z -
v1k1nG - 19.11.2018
PHP код:
CMD:teleport(playerid, params[]){
SetPlayerPos(playerid, 1480.27161, -1642.37793, 13.15613);
return 1;
}
See the cords, it is quite a simple function.
Also read the documentation for more info
https://sampwiki.blast.hk/wiki/SetPlayerPos
Re: CMD to teleport to A certain point by position x y z -
vikoo - 19.11.2018
bro i mean i wanna to goto to any pos in my server cmd like /gotopos 1480.27161, -1642.37793, 13.15613
/gotopos 7872.70166, -1637.35852, 40.74157
Re: CMD to teleport to A certain point by position x y z -
d3Pedro - 20.11.2018
pawn Код:
CMD:gotopos(playerid, params[])
{
new Float:x, Float:y, Float:z, interiorid;
if(sscanf(params, "fffI(0)", x, y, z, interiorid))
{
return SendClientMessage(playerid, -1, "/gotopos [x] [y] [z] [interior]"); //default interior is pointed as 0
}
SetPlayerPos(playerid, x, y, z);
SetPlayerInterior(playerid, interiorid);
return 1;
}
You can remove interior if you want, but i bet you want to test mappings, so you should need that!
Re: CMD to teleport to A certain point by position x y z -
vikoo - 20.11.2018
Quote:
Originally Posted by ConnorW
pawn Код:
CMD:gotopos(playerid, params[]) { new Float:x, Float:y, Float:z, interiorid;
if(sscanf(params, "fffI(0)", x, y, z, interiorid)) { return SendClientMessage(playerid, -1, "/gotopos [x] [y] [z] [interior]"); //default interior is pointed as 0 } SetPlayerPos(playerid, x, y, z); SetPlayerInterior(playerid, interiorid); return 1; }
You can remove interior if you want, but i bet you want to test mappings, so you should need that! 
|
yes iam really wanna test maps thx man +Rep
Re: CMD to teleport to A certain point by position x y z -
v1k1nG - 20.11.2018
Please be more precise in explaining what you need next time