Quote:
Originally Posted by DaRk_RaiN
Might consider adding the interior and virtual world
pawn Код:
CMD:get( playerid, params[ ] ) { if( !IsPlayerAdmin( playerid ) ) return 1; new id ; if( sscanf( params, "r", id ) ) return SendClientMessage( playerid, -1, "Usage: /get <ID/Part Of Name>" ); if( id == INVALID_PLAYER_ID ) return SendClientMessage( playerid, -1, "Offline player" ); new Float: xx, Float: yy, Float: zz, Int, Vir ; GetPlayerPos( playerid, xx, yy, zz ); GetPlayerInterior(playerid, Int); GetPlayerVirtualWorld(playerid, Vir); if( IsPlayerInAnyVehicle( id ) ) RemovePlayerFromVehicle( id ); SetPlayerPos( id, xx, yy, zz ); SetPlayerInterior( id, Int ); SetPlayerVirtualWorld( id, Vir); return 1; }
|
Correct, I forgot it! Although,
GetPlayerInterior and
GetPlayerVirtualWorld return the interior/world id - they're not stored by reference.
pawn Код:
CMD:get( playerid, params[ ] )
{
if( !IsPlayerAdmin( playerid ) ) return 1;
new
id
;
if( sscanf( params, "r", id ) ) return SendClientMessage( playerid, -1, "Usage: /get <ID/Part Of Name>" );
if( id == INVALID_PLAYER_ID ) return SendClientMessage( playerid, -1, "Offline player" );
new
Float: xx,
Float: yy,
Float: zz
;
GetPlayerPos( playerid, xx, yy, zz );
if( IsPlayerInAnyVehicle( id ) ) RemovePlayerFromVehicle( id );
SetPlayerInterior( id, GetPlayerInterior( playerid ) );
SetPlayerPos( id, xx, yy, zz );
SetPlayerVirtualWorld( id, GetPlayerVirtualWorld( playerid ) );
return 1;
}