SetPlayerPos help - 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)
+--- Thread: SetPlayerPos help (
/showthread.php?tid=466616)
SetPlayerPos help -
boomerboom - 28.09.2013
So i /save'd in 1 place but I get error when I put full saved position (without skin id and weapons id) it says that too much numbers.
So now my problem is which place should I delete like:
1584.0790,-2565.1201,13.5469,259.8506 this is my saved pos now what should I delete what numbers ?
Re: SetPlayerPos help -
EiresJason - 28.09.2013
The last number given is the players facing angle, which is set through SetPlayerFacingAngle(playerid,Float:angle).
Try this:
pawn Код:
SetPlayerPos(playerid,1584.0790,-2565.1201,13.5469);
SetPlayerFacingAngle(playerid,259.8506);
Re: SetPlayerPos help -
Konstantinos - 28.09.2013
pawn Код:
1584.0790, -2565.1201, 13.5469, 259.8506
// < X > < Y > < Z > < Angle >
SetPlayerPos has parameters: x, y, z
The angle should be set in SetPlayerFacingAngle function.
Re: SetPlayerPos help -
boomerboom - 28.09.2013
Quote:
Originally Posted by EiresJason
The last number given is the players facing angle, which is set through SetPlayerFacingAngle(playerid,Float:angle).
Try this:
pawn Код:
SetPlayerPos(playerid,1584.0790,-2565.1201,13.5469); SetPlayerFacingAngle(playerid,259.8506);
|
+REP'd but now I get this error:
error 036: empty statement
Код:
}
if(!strcmp("/mm", cmdtext, true))
{
SetPlayerPos(playerid,1584.0790,-2565.1201,13.5469)
;
SetPlayerFacingAngle(playerid,259.8506);
;
SetPlayerHealth(playerid,5)
;
SetPlayerArmour(playerid,0)
;
Re: SetPlayerPos help -
Konstantinos - 28.09.2013
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp("/mm", cmdtext, true))
{
SetPlayerPos(playerid,1584.0790,-2565.1201,13.5469);
SetPlayerFacingAngle(playerid,259.8506);
SetPlayerHealth(playerid,5);
SetPlayerArmour(playerid,0);
return 1;
}
// rest of commands
return 0;
}
Re: SetPlayerPos help -
boomerboom - 28.09.2013
Quote:
Originally Posted by Konstantinos
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if(!strcmp("/mm", cmdtext, true)) { SetPlayerPos(playerid,1584.0790,-2565.1201,13.5469); SetPlayerFacingAngle(playerid,259.8506); SetPlayerHealth(playerid,5); SetPlayerArmour(playerid,0); return 1; } // rest of commands return 0; }
|
Thank you for everytime you helped me