16.11.2012, 14:57
Hi! I want to make a new FS, and I need some help : how do I get the player coords, and then add an object to that coords, at the player's command? REP+

Hi! I want to make a new FS, and I need some help : how do I get the player coords, and then add an object to that coords, at the player's command? REP+
![]() |
if( strcmp("/mycommand", cmdtext, true, 10 ) == 0 )
{
// They have typed /mycommand.
new
Float: MyPosition [ 3 ];
GetPlayerPos( playerid, MyPosition [ 0 ], MyPosition [ 1 ], MyPosition [ 2 ] );
// MyPosition [ 0 ] = X, MyPosition [ 1 ] = Y, MyPosition [ 2 ] = Z;
CreateObject( OBJECTID, MyPosition [ 0 ], MyPosition [ 1 ], MyPosition [ 2 ], 0.0, 0.0, 0.0 );
return true;
}