Help me please
#1

Hi
i just want to know how i can Teleport to X Y Z
if i can't so tell me how i can where i'm in game not with /save
Thanks!
Reply
#2

http://forum.sa-mp.com/search.php?searchid=2947039

Teleport creator FSs
Reply
#3

You cant teleport to Z,Y,Z location if you dont have command for that.

You can make teleport command like.

pawn Код:
if(strcmp(cmdtext, "/teleport", true)==0)
{
        if(IsPlayerInAnyVehicle(playerid))
        {
                if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
                {
                        SetVehiclePos(GetPlayerVehicleID(playerid), X,Y,Z);
                        SetVehicleZAngle(GetPlayerVehicleID(playerid), 178.7448);
                        SetCameraBehindPlayer(playerid);
                }
                else
                {
                        SendClientMessage(playerid,0xFFFF00AA, "ERROR: You need to be the driver!");
                }
        }
        else
        {
                SetPlayerPos(playerid, X,Y,Z);
                SetPlayerFacingAngle(playerid, 110.5445);
                SetCameraBehindPlayer(playerid);
        }
        return 1;
}

Btw, Berlo something i like your avatar
Reply
#4

I did it:
pawn Код:
if(strcmp(cmdtext, "/teleport", true)==0);
{
        if(IsPlayerInAnyVehicle(playerid))
        {
                if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
                {
                        SetVehiclePos(GetPlayerVehicleID(playerid), 215.4644,187.8192,1003.0313);
                        SetVehicleZAngle(GetPlayerVehicleID(playerid), 178.7448);
                        SetCameraBehindPlayer(playerid);
                }
                else
                {
                        SendClientMessage(playerid,0xFFFF00AA, "ERROR: You need to be the driver!");
                }
        }
        else
        {
                SetPlayerPos(playerid, 215.4644,187.8192,1003.0313);
                SetPlayerFacingAngle(playerid, 110.5445);
                SetCameraBehindPlayer(playerid);
        }
        return 1;
}
i got errors what to do?

C:\MRP\gamemodes\M-RP.pwn(8232) : error 017: undefined symbol "cmdtext"
C:\MRP\gamemodes\M-RP.pwn(8232) : error 036: empty statement
C:\MRP\gamemodes\M-RP.pwn(8234) : error 017: undefined symbol "playerid"
C:\MRP\gamemodes\M-RP.pwn(8236) : error 017: undefined symbol "playerid"
C:\MRP\gamemodes\M-RP.pwn(823 : error 017: undefined symbol "playerid"
C:\MRP\gamemodes\M-RP.pwn(8239) : error 017: undefined symbol "playerid"
C:\MRP\gamemodes\M-RP.pwn(8240) : error 017: undefined symbol "playerid"
C:\MRP\gamemodes\M-RP.pwn(8244) : error 017: undefined symbol "playerid"
C:\MRP\gamemodes\M-RP.pwn(8249) : error 017: undefined symbol "playerid"
C:\MRP\gamemodes\M-RP.pwn(8250) : error 017: undefined symbol "playerid"
C:\MRP\gamemodes\M-RP.pwn(8251) : error 017: undefined symbol "playerid"
C:\MRP\gamemodes\M-RP.pwn(853 : warning 209: function "SetPlayerUnjail" should return a value
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
What to do?
Reply
#5

help?
Reply
#6

Find
public OnPlayerCommandText(playerid, cmdtext[])
And put command in there....
Remove ; from first line...
Reply
#7

Are you use you are writing this under OnPlayerCommandText?
Reply
#8

Thanks...
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)