OnPlayerRequestClass - OnPlayerDynamicObject not work -
BrainDamaged - 06.01.2019
Hi,
It works fine if I use CreateObject. I don't know what I'm doing wrong. I tried so many things but it just doesn't work. Streamer_Update and Streamer_UpdateEx make the objects just showing up for like half a second, then they'll disappear.
My OnPlayerRequestClass code;
Streamer_UpdateEx(playerid, Float:2479.4639, Float:2334.1392, Float:10.8890);
TogglePlayerSpectating(playerid, 0);
SetPlayerPos(playerid, 2479.4639, 2334.1392, 10.8890);
SetPlayerCameraPos(playerid,2482.7217, 2338.5298, 10.8890);
SetPlayerCameraLookAt(playerid,2481.3228, 2336.4272, 10.8890);
SetPlayerFacingAngle(playerid, 310.8140);
please help
Re: OnPlayerRequestClass - OnPlayerDynamicObject not work -
BrainDamaged - 06.01.2019
Quote:
Originally Posted by ******
What is OnPlayerDynamicObject meant to do? Most function names should include a verb.
|
OnPlayerDynamicObject I am using, sir, in that;
pawno/include/object.inc;
Код:
object()
{
new tmpobjid;
tmpobjid = CreateDynamicObject(19454, 2487.895507, 2336.786865, 11.520307, 0.000000, 0.000000, 0.000000, -1, -1, -1, 300.00, 300.00);
SetDynamicObjectMaterial(tmpobjid, 0, 6988, "vgnfremnt1", "scmgarage1_128", 0x00000000);
tmpobjid = CreateDynamicObject(19391, 2486.373291, 2341.487792, 11.510315, 0.000000, 0.000000, 90.899986, -1, -1, -1, 300.00, 300.00);
SetDynamicObjectMaterial(tmpobjid, 0, 6988, "vgnfremnt1", "scmgarage1_128", 0x00000000);
tmpobjid = CreateDynamicObject(19454, 2480.035888, 2341.464843, 11.510307, 0.000000, 0.000000, -90.000007, -1, -1, -1, 300.00, 300.00);
SetDynamicObjectMaterial(tmpobjid, 0, 6988, "vgnfremnt1", "scmgarage1_128", 0x00000000);
tmpobjid = CreateDynamicObject(19454, 2477.474121, 2336.666748, 11.500307, 0.000000, 0.000000, 0.000000, -1, -1, -1, 300.00, 300.00);
SetDynamicObjectMaterial(tmpobjid, 0, 6988, "vgnfremnt1", "scmgarage1_128", 0x00000000);
tmpobjid = CreateDynamicObject(19454, 2482.998779, 2331.884277, 11.510307, 0.000000, 0.000000, -90.000007, -1, -1, -1, 300.00, 300.00);
SetDynamicObjectMaterial(tmpobjid, 0, 6988, "vgnfremnt1", "scmgarage1_128", 0x00000000);
}
Go to the my gamemode;
add OnGameModeInıt in object(); and go the the OnPlayerRequestSpawn add
Код:
Streamer_UpdateEx(playerid, Float:2479.4639, Float:2334.1392, Float:10.8890);
TogglePlayerSpectating(playerid, 0);
SetPlayerPos(playerid, 2479.4639, 2334.1392, 10.8890);
SetPlayerCameraPos(playerid,2482.7217, 2338.5298, 10.8890);
SetPlayerCameraLookAt(playerid,2481.3228, 2336.4272, 10.8890);
SetPlayerFacingAngle(playerid, 310.8140);
but objects just showing up for like half a second, then they'll disappear how can I solve this ?
Note: sometimes I can't understand because my english is bad I am so sorry for that we can bring a solution with examples
Re: OnPlayerRequestClass - OnPlayerDynamicObject not work -
BrainDamaged - 06.01.2019
Quote:
Originally Posted by ******
How many objects do you have?
|
118 sir.
Re: OnPlayerRequestClass - OnPlayerDynamicObject not work -
BrainDamaged - 06.01.2019
my problem continues please help
Re: OnPlayerRequestClass - OnPlayerDynamicObject not work -
H4bdel - 07.01.2019
try removing the Float word from Streamer_UpdateEx, if that doesn't work, try putting those objects in OnGameModeInit
Re: OnPlayerRequestClass - OnPlayerDynamicObject not work -
BrainDamaged - 10.01.2019
Quote:
Originally Posted by H4bdel
try removing the Float word from Streamer_UpdateEx, if that doesn't work, try putting those objects in OnGameModeInit
|
"Try removing the Float word from Streamer_UpdateEx"
I deleted it but it doesn't work sir.
"try putting those objects in OnGameModeInit"
from there, sir.
QUOTE:
but objects just showing up for like half a second, then they'll disappear how can I solve this ?
Re: OnPlayerRequestClass - OnPlayerDynamicObject not work -
GeorgeLimit - 11.01.2019
CreateDynamicObject is not working at OnPlayerRequestClass CreateDynamicObject Working if player done do spawn
You can try use :
Quote:
CreateObject(model, x, y, z, rx, ry, rz);
|
Re: OnPlayerRequestClass - OnPlayerDynamicObject not work -
BrainDamaged - 13.01.2019
Quote:
Originally Posted by GeorgeLimit
CreateDynamicObject is not working at OnPlayerRequestClass CreateDynamicObject Working if player done do spawn
You can try use :
|
Streamer_UpdateEx is it not possible to use with?
Re: OnPlayerRequestClass - OnPlayerDynamicObject not work -
BrainDamaged - 13.01.2019
objects just showing up for like half a second, then they'll disappear how can I solve this ? please help
Re: OnPlayerRequestClass - OnPlayerDynamicObject not work -
Killa[DGZ] - 13.01.2019
Umm, I think you just need to remove the toggling of spectate mode, but if for some strange reason you need to do that.. then just make sure you do it well before you attempt to force update of objects at a location.. otherwise it's not needed and is the cause of the objects disappearing.