AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Return user origin with native (https://forums.alliedmods.net/showthread.php?t=125961)

padilha007 05-04-2010 01:42

Return user origin with native
 
is possible?

Exolent[jNr] 05-04-2010 01:43

Re: Return user origin with native
 
Pass the array in the native and use set_array[_f]().

padilha007 05-04-2010 02:04

Re: Return user origin with native
 
could you show me an example?

Exolent[jNr] 05-04-2010 02:12

Re: Return user origin with native
 
Code:
// core plugin public plugin_natives( ) {     register_native( "GetOrigin", "_GetOrigin" ); } public _GetOrigin( iPlugin, iParams ) {     new iPlayer = get_param( 1 );         if( is_user_alive( iPlayer ) )     {         new Float:vOrigin[ 3 ];         pev( iPlayer, pev_origin, vOrigin );                 set_array_f( 2, vOrigin, 3 );     } } // .inc file native GetOrigin( iPlayer, Float:vOrigin[ 3 ] ); // sub plugin #include <that_inc_file> someFunction( iPlayer ) {     new Float:vOrigin[ 3 ];     GetOrigin( iPlayer, vOrigin ); }

padilha007 05-04-2010 02:15

Re: Return user origin with native
 
Tnx dude, good night


All times are GMT -4. The time now is 03:36.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.