[FilterScript] Simple teleport to coords
#3

This will not work correctly.

1) Positions are floats.

2):

It shouldn't be like this.
pawn Код:
YCMD:tp(playerid, params[], help)
{
    {
        new x,y,z;
        if(sscanf(params, "iii", x, y, z))return SendClientMessage(playerid, 0xFF0000FF, "/tp (X/Y/Z)");
        SetPlayerPos(playerid, x, y, z);
        return 1;
    {
    return 1;
}
It should be like this:
pawn Код:
YCMD:tp(playerid, params[], help)
{
    new x,y,z;
    if(sscanf(params, "iii", x, y, z))return SendClientMessage(playerid, 0xFF0000FF, "/tp (X/Y/Z)");
    SetPlayerPos(playerid, x, y, z);
    return 1;
}

Here's a working version:
pawn Код:
YCMD:tp(playerid, params[], help)
{
    new Float:x, Float:y, Float:z;
    if(sscanf(params, "fff", x, y, z)) return SendClientMessage(playerid, 0xFF0000FF, "/tp (X/Y/Z)");
    SetPlayerPos(playerid, x, y, z);
    return 1;
}
Reply


Messages In This Thread
Simple teleport to coords - by JeevanJyothish - 26.08.2014, 09:49
Re: Simple teleport to coords - by KayJ - 26.08.2014, 10:15
Re: Simple teleport to coords - by Stinged - 26.08.2014, 11:32
Re: Simple teleport to coords - by ScripteRNaBEEL - 26.08.2014, 13:21
Re: Simple teleport to coords - by Abagail - 26.08.2014, 13:30

Forum Jump:


Users browsing this thread: 1 Guest(s)