Teleport cmd
#1

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
Reply
#2

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
Reply
#3

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.
Reply
#4

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


Forum Jump:


Users browsing this thread: 1 Guest(s)