SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 24/03/2015, 12:53 AM   #5001
BCG2000
Little Clucker
 
BCG2000's Avatar
 
Join Date: Apr 2013
Location: Brazil
Posts: 27
Reputation: 2
Default Re: Streamer Plugin

Quote:
Originally Posted by Abagail View Post
Glad to hear it worked! A neat function for your case would be:
pawn Code:
stock CancelDynamicEdit(playerid, objectid)
{
       CallLocalFunction("OnPlayerEditDynamicObject", playerid, objectid, EDIT_RESPONSE_CALL, 0, 0, 0, 0, 0, 0);
       CancelEdit(playerid);
     
       return 1;
}
Yea doing it like that, works good.

EDIT: I guess it should be EDIT_RESPONSE_CANCEL instead of EDIT_RESPONSE_CALL.
BCG2000 is offline   Reply With Quote
Old 24/03/2015, 01:07 AM   #5002
Abagail
High-roller
 
Join Date: Dec 2013
Location: GetPlayerPos(playerid, pos); Scripter/Mapper.
Posts: 3,493
Reputation: 439
Default Re: Streamer Plugin

Quote:
Originally Posted by BCG2000 View Post
Yea doing it like that, works good.

EDIT: I guess it should be EDIT_RESPONSE_CANCEL instead of EDIT_RESPONSE_CALL.
It should be. Edited the post.
Abagail is offline   Reply With Quote
Old 24/03/2015, 05:09 AM   #5003
bogdyutzu
Big Clucker
 
Join Date: Nov 2011
Location: Romania, Pitesti
Posts: 138
Reputation: 5
Default Re: Streamer Plugin

Quote:
Originally Posted by kurta999 View Post
I started to work on vehicle streamer in august, now it's in alpha state so who interested, feel free to test it. It is the latest version + vehicle streamer. There will be bugs, it's on beta stage. Trailer functions not completed yet. Who have an idea how to write the best trailer streaming, help me

pawn Code:
#define STREAMER_VEHICLE_TYPE_STATIC (0)
#define STREAMER_VEHICLE_TYPE_DYNAMIC (1)

native AttachDynamicObjectToVehicle(objectid, vehicleid, Float:offsetx, Float:offsety, Float:offsetz, Float:rx, Float:ry, Float:rz, vehicletype = STREAMER_VEHICLE_TYPE_DYNAMIC);

forward OnDynamicVehicleSpawn(vehicleid);
forward OnDynamicVehicleDeath(vehicleid, killerid);
forward OnPlayerEnterDynamicVehicle(playerid, vehicleid, ispassenger);
forward OnPlayerExitDynamicVehicle(playerid, vehicleid);
forward OnDynamicVehicleMod(playerid, vehicleid, componentid);
forward OnDynamicVehiclePaintjob(playerid, vehicleid, paintjobid);
forward OnDynamicVehicleRespray(playerid, vehicleid, color1, color2);
forward OnDynamicVehDamageStatusUpdate(vehicleid, playerid);
forward OnUnoccupiedDynamicVehUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z);
forward OnDynamicVehicleStreamIn(vehicleid, forplayerid);
forward OnDynamicVehicleStreamOut(vehicleid, forplayerid);

native CreateDynamicVehicle(modelid, Float:fX, Float:fY, Float:fZ, Float:fRot, color1, color2, respawndelay, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 300.0);
native DestroyDynamicVehicle(vehicleid);
native IsValidDynamicVehicle(vehicleid);
native IsDynamicVehicleStreamedIn(vehicleid, forplayerid);
native GetDynamicVehiclePos(vehicleid, &Float:x, &Float:y, &Float:z);
native SetDynamicVehiclePos(vehicleid, Float:x, Float:y, Float:z);
native GetDynamicVehicleZAngle(vehicleid, &Float:z_angle);
native GetDynamicVehicleRotationQuat(vehicleid, &Float:w, &Float:x, &Float:y, &Float:z);
native SetDynamicVehicleZAngle(vehicleid, Float:z_angle);
native SetDynamicVehParamsForPlayer(vehicleid,playerid,objective,doorslocked);
native SetDynamicVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
native GetDynamicVehicleParamsEx(vehicleid, &engine, &lights, &alarm, &doors, &bonnet, &boot, &objective);
native SetDynamicVehicleToRespawn(vehicleid);
native LinkDynamicVehicleToInterior(vehicleid, interiorid);
native AddDynamicVehicleComponent(vehicleid, componentid);
native RemoveDynamicVehicleComponent(vehicleid, componentid);
native ChangeDynamicVehicleColor(vehicleid, color1, color2);
native ChangeDynamicVehiclePaintjob(vehicleid, paintjobid);
native SetDynamicVehicleHealth(vehicleid, Float:health);
native GetDynamicVehicleHealth(vehicleid, &Float:health);
native AttachTrailerToDynamicVehicle(trailerid, vehicleid);
native DetachTrailerFromDynamicVeh(vehicleid);
native IsTrailerAttachedToDynamicVeh(vehicleid);
native GetDynamicVehicleTrailer(vehicleid);
native SetDynamicVehicleNumberPlate(vehicleid, plate[]);
native GetDynamicVehicleModel(vehicleid);
native RepairDynamicVehicle(vehicleid); // Repairs the damage model and resets the health
native GetDynamicVehicleVelocity(vehicleid, &Float:X, &Float:Y, &Float:Z);
native SetDynamicVehicleVelocity(vehicleid, Float:X, Float:Y, Float:Z);
native SetDynamicVehAngularVelocity(vehicleid, Float:X, Float:Y, Float:Z);
native GetDynamicVehicleDamageStatus(vehicleid, &panels, &doors, &lights, &tires);
native UpdateDynamicVehDamageStatus(vehicleid, panels, doors, lights, tires);

native GetPlayerSurfingDynamicVehID(playerid);
native PutPlayerInDynamicVehicle(playerid, vehicleid, seatid);
native GetPlayerDynamicVehicleID(playerid);
native IsPlayerInDynamicVehicle(playerid, vehicleid);
native IsPlayerInAnyDynamicVehicle(vehicleid);
native PlayerSpectateDynamicVehicle(playerid, targetvehicleid, mode = SPECTATE_MODE_NORMAL);
A dynamic array would be useful since vehicles id are infinity.
bogdyutzu is offline   Reply With Quote
Old 25/03/2015, 09:47 AM   #5004
kurta999
High-roller
 
kurta999's Avatar
 
Join Date: Apr 2009
Location: Slovakia (HU)
Posts: 1,420
Reputation: 626
Default Re: Streamer Plugin

You can use Streamer_SetInt/Array data for that with E_STREAMER_EXTRA_ID, but that's yet not complete for vehicles. You can store array for every vehicle, so you're not limited to one variable.
__________________
I don't play and have ANY interest in SA:MP anymore! Please do not ask for help, because I'm not going to reply.
kurta999 is offline   Reply With Quote
Old 25/03/2015, 11:58 AM   #5005
bogdyutzu
Big Clucker
 
Join Date: Nov 2011
Location: Romania, Pitesti
Posts: 138
Reputation: 5
Default Re: Streamer Plugin

And how can I store a string combined with another ints or floats.


Code:
new data[2]
data[0] = 2
data[1] = "abc" // on this index i need a string for exemple, how i can sore it?

Streamer_SetArrayData(STREAMER_TYPE_VEHICLE, vehicleid, E_STREAMER_EXTRA_ID, data);
bogdyutzu is offline   Reply With Quote
Old 25/03/2015, 01:44 PM   #5006
kurta999
High-roller
 
kurta999's Avatar
 
Join Date: Apr 2009
Location: Slovakia (HU)
Posts: 1,420
Reputation: 626
Default Re: Streamer Plugin

Code:
new data[2]
data[0] = 2;
data[1] = 'a';
data[2] = 'b';
data[3] = 'c';

Streamer_SetArrayData(STREAMER_TYPE_VEHICLE, vehicleid, E_STREAMER_EXTRA_ID, data);
But this function won't work on vehicles yet, test it on objects.
__________________
I don't play and have ANY interest in SA:MP anymore! Please do not ask for help, because I'm not going to reply.
kurta999 is offline   Reply With Quote
Old 27/03/2015, 01:07 PM   #5007
Tamer
High-roller
 
Tamer's Avatar
 
Join Date: Nov 2011
Location: Turkey
Posts: 1,183
Reputation: 169
Default Re: Streamer Plugin

Is there not a GetDynamicObjectModel() function?
__________________
The three stages of truth:

- Ridicule.
- Violent opposition.
- Acceptance.


Quote:
The greatest hypnotist on the planet Earth is an oblong box in the corner of the room. It is constantly telling us what to believe is real. If you can persuade people that what they see with their eyes is what there is to see you've got them. you know because they'll laugh in your face of an explanation that portrays the biggest picture of what's happening... and they have.
Tamer is offline   Reply With Quote
Old 27/03/2015, 01:23 PM   #5008
kurta999
High-roller
 
kurta999's Avatar
 
Join Date: Apr 2009
Location: Slovakia (HU)
Posts: 1,420
Reputation: 626
Default Re: Streamer Plugin

Use new modelid = Streamer_GetIntData(STREAMER_TYPE_OBJECT, objectid, E_STREAMER_MODEL_ID);
__________________
I don't play and have ANY interest in SA:MP anymore! Please do not ask for help, because I'm not going to reply.
kurta999 is offline   Reply With Quote
Old 27/03/2015, 01:27 PM   #5009
Tamer
High-roller
 
Tamer's Avatar
 
Join Date: Nov 2011
Location: Turkey
Posts: 1,183
Reputation: 169
Default Re: Streamer Plugin

Quote:
Originally Posted by kurta999 View Post
Use new modelid = Streamer_GetIntData(STREAMER_TYPE_OBJECT, objectid, E_STREAMER_MODEL_ID);

Oh right, I can use the enumulator for that. Thank you.
__________________
The three stages of truth:

- Ridicule.
- Violent opposition.
- Acceptance.


Quote:
The greatest hypnotist on the planet Earth is an oblong box in the corner of the room. It is constantly telling us what to believe is real. If you can persuade people that what they see with their eyes is what there is to see you've got them. you know because they'll laugh in your face of an explanation that portrays the biggest picture of what's happening... and they have.
Tamer is offline   Reply With Quote
Old 29/03/2015, 01:27 PM   #5010
GuyYahood1
Big Clucker
 
Join Date: Dec 2010
Posts: 177
Reputation: 6
Default Re: Streamer Plugin

Why this public not calling?
Quote:
OnPlayerShootDynamicObject
__________________
GuyYahood1 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Include] Checkpoint / Area sub-streamer for incognito's streamer plugin Pottus Includes 11 21/03/2014 06:31 PM
Need 3dtextlabel Streamer And Gangzone Streamer !! Please Help . Not streamer plugin . jame42 Scripting Help 4 30/05/2012 07:33 AM
Streamer plugin 0.3d rt-2 Plugin Development 7 05/12/2011 06:17 PM
Streamer Plugin Help! ColdXX Everything and Nothing 2 21/08/2010 10:28 PM
Streamer Plugin! ColdXX Help Archive 10 18/07/2010 12:47 PM


All times are GMT. The time now is 05:41 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.