27.10.2013, 20:31
Your code seems fine, I haven't found any error, but at least try this code
pawn Код:
CMD:goto(playerid, params[])
{
new
targetid, string[50], Float:Positions[3];
if(sscanf(params, "u", targetid))
return SendClientMessage(playerid, COLOR_ERROR, "Usage: /goto (ID)");
if(!IsPlayerConnected(targetid))
return SendClientMessage(playerid, COLOR_ERROR, "Invalid ID.");
GetPlayerPos( targetid, Positions[0], Positions[1], Positions[2] ), SetPlayerPos( playerid, Positions[0], Positions[1], Positions[2] ),
SetPlayerInterior( playerid, GetPlayerInterior(targetid) ), SetPlayerVirtualWorld( playerid, GetPlayerVirtualWorld(targetid) );
format(string, sizeof(string), "You have teleported to %s", PlayerInfo(targetid));
SendClientMessage(playerid, COLOR_ADMIN, string);
return true;
}