Gamer_Z

03/05/2010, 06:47 PM

Get rid of making milion changes to you map if you plan to use this streamer...

just use this a_objects.inc instead of the standart one.

maybe simple.. but effective!

/* SA-MP Object Functions

*

* (c) Copyright 2005-2009, SA-MP Team

*

* Edited by Gamer_Z

*/

#if defined _objects_included

#endinput

#endif

#define _objects_included

#pragma library objects

native CreatePlayerObject(playerid, modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ);

native SetPlayerObjectPos(playerid, objectid, Float:X, Float:Y, Float:Z);

native GetPlayerObjectPos(playerid, objectid, &Float:X, &Float:Y, &Float:Z);

native SetPlayerObjectRot(playerid, objectid, Float:RotX, Float:RotY, Float:RotZ);

native GetPlayerObjectRot(playerid, objectid, &Float:RotX, &Float:RotY, &Float:RotZ);

native IsValidPlayerObject(playerid, objectid);

native DestroyPlayerObject(playerid, objectid);

native MovePlayerObject(playerid, objectid, Float:X, Float:Y, Float:Z, Float:Speed);

native StopPlayerObject(playerid, objectid);

native AttachObjectToPlayer(objectid, playerid, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:rX, Float:rY, Float:rZ);

native AttachPlayerObjectToPlayer(objectplayer, objectid, attachplayer, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:rX, Float:rY, Float:rZ);

#include <streamer>

// Objects

stock CreateObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz){

return CreateDynamicObject(modelid, x, y, z, rx, ry, rz,0,-1,-1,300.0);

}

/*stock CREATEOBJECT(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:distance = 200.0){

return CreateDynamicObject(modelid, x, y, z, rx, ry, rz,worldid,interiorid,playerid,distance);

}*/

stock SetObjectPos(objectid, Float:X, Float:Y, Float:Z){

return SetDynamicObjectPos(objectid, X, Y, Z);

}

stock GetObjectPos(objectid, &Float:x, &Float:y, &Float:z){

return GetDynamicObjectPos(objectid, x, y, z);

}

stock SetObjectRot(objectid, Float:RotX, Float:RotY, Float:RotZ){

return SetDynamicObjectRot(objectid, RotX, RotY, RotZ);

}

stock GetObjectRot(objectid, &Float:RotX, &Float:RotY, &Float:RotZ){

return GetDynamicObjectRot(objectid, RotX, RotY, RotZ);

}

stock IsValidObject(objectid){

return IsValidDynamicObject(objectid);

}

stock DestroyObject(objectid){

return DestroyDynamicObject(objectid);

}

stock MoveObject(objectid, Float:X, Float:Y, Float:Z, Float:Speed){

return MoveDynamicObject(objectid, X, Y, Z, Speed);

}

stock StopObject(objectid){

return StopDynamicObject(objectid);

}

stock DestroyAllObjects(){

return DestroyAllDynamicObjects();

}

stock CountObjects(){

return CountDynamicObjects();

}

just use this a_objects.inc instead of the standart one.

maybe simple.. but effective!

/* SA-MP Object Functions

*

* (c) Copyright 2005-2009, SA-MP Team

*

* Edited by Gamer_Z

*/

#if defined _objects_included

#endinput

#endif

#define _objects_included

#pragma library objects

native CreatePlayerObject(playerid, modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ);

native SetPlayerObjectPos(playerid, objectid, Float:X, Float:Y, Float:Z);

native GetPlayerObjectPos(playerid, objectid, &Float:X, &Float:Y, &Float:Z);

native SetPlayerObjectRot(playerid, objectid, Float:RotX, Float:RotY, Float:RotZ);

native GetPlayerObjectRot(playerid, objectid, &Float:RotX, &Float:RotY, &Float:RotZ);

native IsValidPlayerObject(playerid, objectid);

native DestroyPlayerObject(playerid, objectid);

native MovePlayerObject(playerid, objectid, Float:X, Float:Y, Float:Z, Float:Speed);

native StopPlayerObject(playerid, objectid);

native AttachObjectToPlayer(objectid, playerid, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:rX, Float:rY, Float:rZ);

native AttachPlayerObjectToPlayer(objectplayer, objectid, attachplayer, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:rX, Float:rY, Float:rZ);

#include <streamer>

// Objects

stock CreateObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz){

return CreateDynamicObject(modelid, x, y, z, rx, ry, rz,0,-1,-1,300.0);

}

/*stock CREATEOBJECT(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:distance = 200.0){

return CreateDynamicObject(modelid, x, y, z, rx, ry, rz,worldid,interiorid,playerid,distance);

}*/

stock SetObjectPos(objectid, Float:X, Float:Y, Float:Z){

return SetDynamicObjectPos(objectid, X, Y, Z);

}

stock GetObjectPos(objectid, &Float:x, &Float:y, &Float:z){

return GetDynamicObjectPos(objectid, x, y, z);

}

stock SetObjectRot(objectid, Float:RotX, Float:RotY, Float:RotZ){

return SetDynamicObjectRot(objectid, RotX, RotY, RotZ);

}

stock GetObjectRot(objectid, &Float:RotX, &Float:RotY, &Float:RotZ){

return GetDynamicObjectRot(objectid, RotX, RotY, RotZ);

}

stock IsValidObject(objectid){

return IsValidDynamicObject(objectid);

}

stock DestroyObject(objectid){

return DestroyDynamicObject(objectid);

}

stock MoveObject(objectid, Float:X, Float:Y, Float:Z, Float:Speed){

return MoveDynamicObject(objectid, X, Y, Z, Speed);

}

stock StopObject(objectid){

return StopDynamicObject(objectid);

}

stock DestroyAllObjects(){

return DestroyAllDynamicObjects();

}

stock CountObjects(){

return CountDynamicObjects();

}