Help me please -
Chris_Morrison - 25.08.2011
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!
Re: Help me please -
sleepysnowflake - 25.08.2011
http://forum.sa-mp.com/search.php?searchid=2947039
Teleport creator FSs
Re: Help me please -
Sensitive - 25.08.2011
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
Re: Help me please -
Chris_Morrison - 25.08.2011
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?
Re: Help me please -
Chris_Morrison - 25.08.2011
help?
Re: Help me please -
Dragony92 - 25.08.2011
Find
public OnPlayerCommandText(playerid, cmdtext[])
And put command in there....
Remove ; from first line...
Re: Help me please -
Kayaque - 25.08.2011
Are you use you are writing this under OnPlayerCommandText?
Re: Help me please -
Chris_Morrison - 25.08.2011
Thanks...