/goto [ID]
#1

I'm having problems with a /goto [ID] command, an example would be nice.
Reply
#2

pawn Код:
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;
}
Reply
#3

Sweet, thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)