/goto only goes to id 0
#1

when an admin types /goto it only teleports them to ID 0, even if you just type /goto, if somebody could show me what i'v done wrong it would be much appericated.
pawn Код:
COMMAND:goto(playerid, params[])
{
    if(GetPlayerAdmin(playerid) < 1) return SendBlockedAdminCommand(playerid, 1);
    new
        toid,
        Float:ox,
        Float:oy,
        Float:oz;
    if (sscanf(params, "uF(1.5)F(0.0)F(0.0)", toid, ox, oy, oz)) return SendClientMessage(playerid, COLOR_RED, "[USAGE]: /goto PLAYERID [X_OFFSET [Y_OFFSET [Z_OFFSET]]]");
    if (toid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "[ERROR]:That player is not connected.");
    new
        Float:x,
        Float:y,
        Float:z;
    GetPlayerPos(toid, x, y, z);
    SetPlayerInterior(playerid, GetPlayerInterior(toid));
    SetPlayerPos(playerid, x + ox, y + oy, z + oz);
    new
        str[38 + 10 + MAX_PLAYER_NAME + 1];
    GetPlayerName(toid, str, MAX_PLAYER_NAME);
    format(str, sizeof (str), "Teleported to %s(%d).", str, toid);
    SendClientMessage(playerid, COLOR_YELLOW, str);
    return 1;
}
Reply


Messages In This Thread
/goto only goes to id 0 - by Haydz - 14.12.2010, 03:00
Re: /goto only goes to id 0 - by JamesC - 14.12.2010, 03:07
Re: /goto only goes to id 0 - by XePloiT - 14.12.2010, 03:09
Re: /goto only goes to id 0 - by JamesC - 14.12.2010, 03:12
Re: /goto only goes to id 0 - by XePloiT - 14.12.2010, 03:21
Re: /goto only goes to id 0 - by Haydz - 14.12.2010, 03:22
Re: /goto only goes to id 0 - by XePloiT - 14.12.2010, 03:27
Re: /goto only goes to id 0 - by Haydz - 14.12.2010, 03:41
Re: /goto only goes to id 0 - by XePloiT - 14.12.2010, 03:42

Forum Jump:


Users browsing this thread: 3 Guest(s)