[Include] streamer extended [not over]
#1

Introduction

Hi.

I've made some functions (really easy to make, but good for beginners or lazy persons) which can make an easier way to use the streamer.
The include is not over, I've currently made the functions about the dynamic objects, the dynamic pickups, the dynamic checkpoints and the dynamic race checkpoints. I release it now because I won't work on for a moment because of exams.

List of functions

pawn Код:
/****************
    CountAreas
    ****************/


native CountDynamicPolygons();
native CountDynamicCubes();
native CountDynamicSpheres();
native CountDynamicRectangles();
native CountDynamicCircles();

    /*****************
        Objects
    *****************/

native GetDynamicObjectModel(objectid);
native SetDynamicObjectModel(objectid, modelid);
native GetDynamicObjectStreamParams(objectid, &worldid, &interiorid, &playerid);
native SetDynamicObjectStreamParams(objectid, worldid = -1, interiorid = -1, playerid = -1);
native Float:GetDynamicObjectStreamDistance(objectid);
native Float:GetDynamicObjectDrawDistance(objectid);
native SetDynamicObjectStreamDistance(objectid, Float:streamdistance);
native SetDynamicObjectDrawDistance(objectid, Float:drawdistance);
native IsPlayerInRangeOfDynamicObject(playerid, objectid, Float:radi = 5.0);
native IsDynamicObjectInRangeOfPoint(objectid, Float:x, Float:y, Float:z, Float:radi = 5.0);
native GetNearestObjectFromObject(objectid, Float:radi = 0.3);
native GetNearestObjectFromVehicle(objectid, vehicleid, Float:radi = 1.0);
native GetNearestObjectFromPlayer(objectid, playerid, Float:radi = 0.5);
native GetNearestObjectFromPickup(objectid, pickupid, Float:radi = 1.0);

    /*****************
        Pickups
    *****************/

   
native GetDynamicPickupPos(pickupid, &Float:x, &Float:y, &Float:z);
native SetDynamicPickupPos(pickupid, Float:x, Float:y, Float:z);
native GetDynamicPickupType(pickupid);
native SetDynamicPickupType(pickupid, type);
native GetDynamicPickupStreamParams(pickupid, &worldid, &interiorid, &playerid);
native SetDynamicPickupStreamParams(pickupid, worldid = -1, interiorid = -1, playerid = -1);
native GetDynamicPickupModel(pickupid);
native SetDynamicPickupModel(pickupid, modelid);
native Float:GetDynamicPickupStreamDistance(pickupid);
native SetDynamicPickupStreamDistance(pickupid, Float:strdistance);
native IsPlayerInRangeOfDynamicPickup(playerid, pickupid, Float:range = 3.0);
native IsDynamicPickupInRangeOfPoint(pickupid, Float:x, Float:y, Float:z, Float:range = 3.0);

    /******************
        Checkpoints
    ******************/

   
native GetDynamicCPPos(checkpointid, &Float:x, &Float:y, &Float:z);
native SetDynamicCPPos(checkpointid, Float:x, Float:y, Float:z);
native Float:GetDynamicCPSize(checkpointid);
native SetDynamicCPSize(checkpointid, Float:size);
native GetDynamicCPStreamParams(checkpointid, &worldid, &interiorid, &playerid);
native SetDynamicCPStreamParams(checkpointid, worldid = -1, interiorid = -1, playerid = -1);
native Float:GetDynamicCPStreamDistance(checkpointid);
native SetDynamicCPStreamDistance(checkpointid, Float:streamdistance);
native IsDynamicObjectInRangeOfCP(objectid, checkpointid, Float:range = 5.0);
native IsDynamicCPInRangeOfPoint(checkpointid, Float:x, Float:y, Float:z, Float:range = 5.0);

    /**********************
        Race checkpoints
    **********************/

   
native GetDynamicRaceCPType(checkpointid);
native SetDynamicRaceTPType(checkpointid, type);
native GetDynamicRCPPos(checkpointid, &Float:x, &Float:y, &Float:z);
native GetDynamicRCPNextPos(checkpointid, &Float:x, &Float:y, &Float:z);
native SetDynamicRCPPos(checkpointid, Float:x, Float:y, Float:z);
native SetDynamicRCPNextPos(checkpointid, Float:x, Float:y, Float:z);
native Float:GetDynamicRCPSize(checkpointid);
native SetDynamicRCPSize(checkpointid, Float:size);
native GetDynamicRCPStreamParams(checkpointid, &worldid, &interiorid, &playerid);
native SetDynamicRCPStreamParams(checkpointid, worldid = -1, interiorid = -1, playerid = -1);
native Float:GetDynamicRCPStreamDistance(checkpointid);
native SetDynamicRCPStreamDistance(checkpointid, Float:streamdistance);
There are currently 53.

Bugs known

• Line 405 : warning 203 - tag mismatch
I've posted a help topic about that but I haven't gotten any solution (only an answer which had suggested me something I've already done), so if someone knows how to fix it, tell me
It's about dynamic 3d text labels, so because I haven't made the functions about that, you can delete the function if you plan to use the include as it is, or fix it if you plan to add functions.

Thanks to

Код:
• Incognito : Streamer
• Patrick_, Vince : GetDistanceBetweenPoints, help about the function and how to use it
• SA-MP team
• Me : The include
Link

• Pastebin

That's the end, hope you'll enjoy
If you have something to tell me about the include, simply answer the post or PM me.
That's my first release in the english section. It might remain some "french" words in commentaries, if there are, I'm sorry.

Have a nice day/evening.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)