SA-MP Forums Archive
Some mhelp over here... - 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: Some mhelp over here... (/showthread.php?tid=392946)



Some mhelp over here... - DiGiTaL_AnGeL - 16.11.2012

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+


Re: Some mhelp over here... - 2KY - 16.11.2012

Quote:
Originally Posted by DiGiTaL_AnGeL
Посмотреть сообщение
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+
GetPlayerPos
CreateObject

pawn Код:
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;
    }



Re: Some mhelp over here... - DiGiTaL_AnGeL - 16.11.2012

Here's the problem :