10.02.2010, 03:21
I'm having problems with a /goto [ID] command, an example would be nice.
dcmd_Goto(playerid, params[])
{
new id = strval(params)
else if(!strlen(params)) return SendClientMessage(playerid, 0xFF0000AA, "/Goto [playerid]");
else if(id == playerid) return SendClientMessage(playerid, 0xFF0000AA, "You cannot goto yourself...");
else if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFF0000AA, "Player is not connected");
else
{
new Float:X, Float:Y, Float:Z, Pname[24];
GetPlayerPos(id, X, Y, Z);
GetPlayerName(id, Pname, 24);
SetPlayerPos(playerid, X, Y, Z);
new String[56];
format(String, sizeof(String), "You have teleported to %s(%d)", Pname, id);
SendClientMessage(playerid, 0xFF0000AA, String);
}
return 1;
}