09.02.2019, 19:05
Switch
09.02.2019, 19:06
yes4char
09.02.2019, 19:10
so why do I have only one of the three objects when i create it like this?
09.02.2019, 19:13
You actually should have them always all.
Because every pos gets initialisized with the same Float.
And all should be created.
Because every pos gets initialisized with the same Float.
And all should be created.
09.02.2019, 19:15
The code is completely fine (although it is dumb, I hope it was just an example). Try with different object IDs and different coordinates, I just checked all of the IDs on this site, 7156 isn't even a valid ID and 2000 is a small object that could easily be somewhere inside 4526, which is massive.
09.02.2019, 19:43
Quote:
The code is completely fine (although it is dumb, I hope it was just an example). Try with different object IDs and different coordinates, I just checked all of the IDs on this site, 7156 isn't even a valid ID and 2000 is a small object that could easily be somewhere inside 4526, which is massive.
|

09.02.2019, 20:41
The code is fine, every object is created. The thing is you have made every single object in the same coordinates. You will not be able to see the difference, because they are duplicated.
Your code is all good.
Your code is all good.
09.02.2019, 20:45
Quote:
The code is fine, every object is created. The thing is you have made every single object in the same coordinates. You will not be able to see the difference, because they are duplicated.
Your code is all good. |
Код:
DestroyObject(Barrel); Barrel = CreateObject(1225, nx, ny, nz, 0.0 ,0.0, 0.0); Delete3DTextLabel(Barrel_text); Barrel_text = Create3DTextLabel("Barrel. Use command /take", 0xFFBE00FF, nx, ny, nz, 10.0, 0, 1);
09.02.2019, 20:55
It should be a virtual world problem, what is your ingame VW?
09.02.2019, 21:00
No i changing it just when i go into interior and theese three objects ar in land, mountains, parks, so vitrual world is not changing. That's why 3d text parameter vw is null.
09.02.2019, 21:12
You don't need switches for this at all in fact you used them very poorly and have shit loads of extra code for a task that is very simple. From 72 lines to 16.
Код:
static Float:g_ObjectPositions[][3] = { { 2454.0, 965.0, 6.2 }, { 2454.0, 965.0, 6.2 }, { 2454.0, 965.0, 6.2 } }; public MyForwardedCallback() { new r = random(sizeof(g_ObjectPositions)); CreateObject(2000, g_ObjectPositions[r][0], g_ObjectPositions[r][1], g_ObjectPositions[r][2], 0.0, 0.0, 0.0); r = random(sizeof(g_ObjectPositions)); CreateObject(7156, g_ObjectPositions[r][0], g_ObjectPositions[r][1], g_ObjectPositions[r][2], 0.0, 0.0, 0.0); r = random(sizeof(g_ObjectPositions)); CreateObject(4526, g_ObjectPositions[r][0], g_ObjectPositions[r][1], g_ObjectPositions[r][2], 0.0, 0.0, 0.0); return 1; }
09.02.2019, 21:48
Quote:
You don't need switches for this at all in fact you used them very poorly and have shit loads of extra code for a task that is very simple. From 72 lines to 16.
Код:
static Float:g_ObjectPositions[][3] = { { 2454.0, 965.0, 6.2 }, { 2454.0, 965.0, 6.2 }, { 2454.0, 965.0, 6.2 } }; public MyForwardedCallback() { new r = random(sizeof(g_ObjectPositions)); CreateObject(2000, g_ObjectPositions[r][0], g_ObjectPositions[r][1], g_ObjectPositions[r][2], 0.0, 0.0, 0.0); r = random(sizeof(g_ObjectPositions)); CreateObject(7156, g_ObjectPositions[r][0], g_ObjectPositions[r][1], g_ObjectPositions[r][2], 0.0, 0.0, 0.0); r = random(sizeof(g_ObjectPositions)); CreateObject(4526, g_ObjectPositions[r][0], g_ObjectPositions[r][1], g_ObjectPositions[r][2], 0.0, 0.0, 0.0); return 1; } |
10.02.2019, 03:08
That is because you didn't follow the parameters correctly. You forgot to insert the playerid parameter. Please refer to the SA-MP Wiki for more information.
Код:
Create3DTextLabel(playerid, "Barrel. Use command /take", 0xFFBE00FF, nx, ny, nz, 10.0, 0, 1);
10.02.2019, 05:38
Quote:
That is because you didn't follow the parameters correctly. You forgot to insert the playerid parameter. Please refer to the SA-MP Wiki for more information.
Код:
Create3DTextLabel(playerid, "Barrel. Use command /take", 0xFFBE00FF, nx, ny, nz, 10.0, 0, 1); |
There is a difference between Create3DTextLabel and CreatePlayer3DTextLabel...
10.02.2019, 05:40
10.02.2019, 10:15
Quote:
That is because you didn't follow the parameters correctly. You forgot to insert the playerid parameter. Please refer to the SA-MP Wiki for more information.
Код:
Create3DTextLabel(playerid, "Barrel. Use command /take", 0xFFBE00FF, nx, ny, nz, 10.0, 0, 1); |

10.02.2019, 13:24
Quote:
Stll need help. I giving part of my code. Link to pastebin here
|
Vague guess but have you tried increasing your draw distance to a high value just to make sure that the 3D text label is actually there?
10.02.2019, 13:40
Quote:
I assume the object creation part is fixed, which means that the function is getting called properly. If you didn't know, you have to wait around 120000ms (2 minutes) until your custom function will get executed for the first time from server launch.
Vague guess but have you tried increasing your draw distance to a high value just to make sure that the 3D text label is actually there? |

Exaclty, problem is what there is no 3DText. 3Dtext draw distance is 10.0, Using command /take it wants 3.0 distance from object and it works, so if 3dtext were in there i could see it because i'm close.
10.02.2019, 15:05
Quote:
Yes it's two minutes, because i testing it so i cant wait 45 minutes
![]() Exaclty, problem is what there is no 3DText. 3Dtext draw distance is 10.0, Using command /take it wants 3.0 distance from object and it works, so if 3dtext were in there i could see it because i'm close. |

« Next Oldest | Next Newest »
Users browsing this thread: 1 Guest(s)