28.08.2014, 11:15
Can somone tell me how to make to teleport on cords /xgoto z x like that ..
example /xgoto 2350.339843 -1181.649902 1027.976562
example /xgoto 2350.339843 -1181.649902 1027.976562
COMMAND:gotoco(playerid, params[])
{
new Float:x, Float:y, Float:z;
if(sscanf(params, "fff", x, y, z)) return SendClientMessage(playerid, -1, "(USAGE) /xogotoco[x][y][z]");
SetPlayerPos(playerid, x,y,z);
return 1;
}
CMD:gotoco(playerid, params[])
{
new string[300], Float:x, Float:y, Float:z, interior, world;
if(sscanf(params, "fffd", x, y, z, interior, world)) return SendClientMessage(playerid, -1, "(USAGE) /xogotoco[x][y][z]");
SetPlayerPos(playerid, x,y,z);
SetPlayerVirtualWorld(playerid, world);
return 1;
}
CMD:xgoto(playerid, params[])
{
new
string[300],
Float:x,
Float:y,
Float:z,
interiorid;
if(sscanf(params, "fffD(0)", x, y, z, interiorid)) return SendClientMessage(playerid, -1, "(USAGE) /xgoto[x][y][z] <Interior ID>");
SetPlayerPos(playerid, x,y,z);
SetPlayerInterior(playerid, interiorid);
return 1;
}
Fixed version of Death1300's solution:
pawn Код:
|