Simple teleport/interior command - 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: Simple teleport/interior command (
/showthread.php?tid=107236)
Simple teleport/interior command -
Jimakos_Static - 08.11.2009
Hello, I want to make a simple teleport command but I don't know how...
each time when I teleport somewhere I want to write down the coords and the interior
example:
/teleport [My written x coords] [my written y coords] [my written z coords] [my written interior]
Re: Simple teleport/interior command -
Backwardsman97 - 09.11.2009
Straight out of the debug filterscript by Simon Campbell.
pawn Код:
dcmd_setloc(playerid, params[])
{
new idx, iString[128];
iString = strtok(params, idx);
if (!strlen(iString)) {
SendClientMessage(playerid, COLOR_RED, "[USAGE]: /setloc X Y Z INTERIOR");
return true;
}
new Float:X, Float:Y, Float:Z;
new Interior;
X = floatstr(iString);
Y = floatstr(strtok(params,idx));
Z = floatstr(strtok(params,idx));
Interior = strval(strtok(params,idx));
new pVID = GetPlayerVehicleID( playerid );
if ( pVID )
{
SetVehiclePos( pVID, X, Y, Z );
LinkVehicleToInterior( pVID, Interior );
}
else
{
SetPlayerPos( playerid, X, Y, Z );
}
SetPlayerInterior(playerid, Interior);
return true;
}
Re: Simple teleport/interior command -
Jimakos_Static - 09.11.2009
Thanks