SetPlayerPos Help
#1

Hi Guys,
I am Compiler But nowadays I am having Problems with my coding. When Put a Teleport command.

Код:
	if (strcmp("/sfa", cmdtext, true, 10) == 0)
	{SetPlayerPos(playerid,-1353.3026,-235.7281,14.1440,315.7605);
	SendClientMessage(playerid, 0xFFFF00AA, "You Have Gone To San Ferrieno Airport" );
		// SFA Teleport
		return 1;
	}
I get this warning.

Код:
 warning 202: number of arguments does not match definition.
Can Anybody help me Please?

Regards,
Compiler
Reply
#2

it is becoz setplayerpos have 4 parameters and you used 5

use this

PHP код:
if (strcmp("/sfa"cmdtexttrue10) == 0)
    {
SetPlayerPos(playerid,-1353.3026,-235.7281,14.1440);
    
SendClientMessage(playerid0xFFFF00AA"You Have Gone To San Ferrieno Airport" );
        
// SFA Teleport
        
return 1;
    } 
Reply
#3

Change ur code with this

PHP код:
SetPlayerPos(playerid,-1353.3026,-235.7281,14.1440); 
Reply
#4

But I also want to set Facing Angle with SetPlayerPos
Reply
#5

Quote:
Originally Posted by Compiler
Посмотреть сообщение
But I also want to set Facing Angle with SetPlayerPos
pawn Код:
SetPlayerFacingAngle(playerid, Float:ang)
Reply
#6

SetPlayerPos only has three parameters. X, Y and Z.

As Yochui said, you'll have to use SetPlayerFacing angle to set the angle.
Reply
#7

PHP код:
if (strcmp("/sfa"cmdtexttrue10) == 0)
    {
SetPlayerPos(playerid,-1353.3026,-235.7281,14.1440);
         
SetPlayerFacingAngle(playerid,315.7605);
    
SendClientMessage(playerid0xFFFF00AA"You Have Gone To San Ferrieno Airport" );
        
// SFA Teleport
        
return 1;
    } 
Reply
#8

Thanks Alot Guys
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)