SA-MP Forums Archive
Teleport cmd - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Teleport cmd (/showthread.php?tid=210029)



Teleport cmd - Deal-or-die - 12.01.2011

ok, this is my cmd
pawn Код:
command(hm, playerid, params[])
{
    if(Player[playerid][Group] = 2)
    {
        SendClientMessage(playerid, WHITE, "Welcome fellow hitman");
        SetVehiclePos(GetPlayerVehicleID(playerid), -2093.0073, 887.5366, 1396.1660);
        SetPlayerPos(playerid,x,y,z),-2073.8323, 972.0553, 62.9219);
    }
    return 1;
}
and this is my errors
Код:
error 017: undefined symbol "x"
error 029: invalid expression, assumed zero
warning 215: expression has no effect
errors on this line "SetPlayerPos(playerid,x,y,z),-2073.8323, 972.0553, 62.9219);"
any help is hugely appreciated thanks


Re: Teleport cmd - wilko1995 - 12.01.2011

you have to create new variables:
Код:
new Float:x, Float:y, Float:z;
i added the y and z cause once you put the x in then y and z will have an error


Re: Teleport cmd - Antonio [G-RP] - 12.01.2011

pawn Код:
command(hm, playerid, params[])
{
    if(Player[playerid][Group] = 2)
    {
        SendClientMessage(playerid, WHITE, "Welcome fellow hitman");
        SetVehiclePos(GetPlayerVehicleID(playerid), -2093.0073, 887.5366, 1396.1660);
        SetPlayerPos(playerid,-2073.8323, 972.0553, 62.9219);
    }
    return 1;
}
You don't need to put x,y,z in SetPlayerPos unless the co-ords were predefined.


Re: Teleport cmd - wilko1995 - 12.01.2011

or Antonio's way, lol i didnt even think of that =S