SetPlayerPos help
#1

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

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

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

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)
		;
Reply
#5

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;
}
Reply
#6

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)