Texturing Help !
#1

Hello.. I textured a map and it doesn't work IG :/

I've done this :
Код:
   	new grass = CreateDynamicObject(8661, 239.54919, 1429.49438, 9.58680,   0.00000, 0.00000, 0.00000);
    SetObjectMaterial(grass, 0, 17877, "landhub", "dirtKB_64HV");
    grass = CreateDynamicObject(8661, 199.54930, 1429.49438, 9.58680,   0.00000, 0.00000, 0.00000);
    SetObjectMaterial(grass, 0, 17877, "landhub", "dirtKB_64HV");
    grass = CreateDynamicObject(8661, 163.92641, 1429.49438, 9.58880,   0.00000, 0.00000, 0.00000);
    SetObjectMaterial(grass, 0, 17877, "landhub", "dirtKB_64HV");
    grass = CreateDynamicObject(8661, 163.92641, 1412.45239, 9.59080,   0.00000, 0.00000, 0.00000);
    SetObjectMaterial(grass, 0, 17877, "landhub", "dirtKB_64HV");
    grass = CreateDynamicObject(8661, 246.07111, 1419.51489, -10.39270,   -0.09000, 90.00000, 270.00000);
    SetObjectMaterial(grass, 0, 17877, "landhub", "dirtKB_64HV");
    grass = CreateDynamicObject(19381, 225.75252, 1378.60693, 9.81440,   0.00000, 90.00000, 0.00000);
    SetObjectMaterial(grass, 0, 17877, "landhub", "dirtKB_64HV");
    grass = CreateDynamicObject(19381, 225.75369, 1388.24182, 9.81440,   0.00000, 90.00000, 0.00000);
    SetObjectMaterial(grass, 0, 17877, "landhub", "dirtKB_64HV");
    grass = CreateDynamicObject(19381, 215.25240, 1388.24182, 9.81440,   0.00000, 90.00000, 0.00000);
    SetObjectMaterial(grass, 0, 17877, "landhub", "dirtKB_64HV");
    grass = CreateDynamicObject(19381, 215.25240, 1378.60693, 9.81440,   0.00000, 90.00000, 0.00000);
    SetObjectMaterial(grass, 0, 17877, "landhub", "dirtKB_64HV");
And When I run the server it says :

Код:
[13:46:11] Script[gamemodes/core.amx]: Run time error 20: "Invalid index parameter (bad entry point)"
[13:46:11] Number of vehicle models: 3
But The server works, and the map works, it just doesn't show the texture.. Help?
Reply
#2

You need to use SetDynamicObjectMaterialEx since you are creating dynamic objects, and not standard server objects. As for the latter issue; it is probably because you don't have the main function in the gamemode script(core.pwn).

Simply add,
pawn Код:
main() { }
And it should work.
Reply
#3

Quote:
Originally Posted by Jigsaw123
Посмотреть сообщение
Hello.. I textured a map and it doesn't work IG :/

I've done this :
Код:
   	new grass = CreateDynamicObject(8661, 239.54919, 1429.49438, 9.58680,   0.00000, 0.00000, 0.00000);
    SetObjectMaterial(grass, 0, 17877, "landhub", "dirtKB_64HV");
    grass = CreateDynamicObject(8661, 199.54930, 1429.49438, 9.58680,   0.00000, 0.00000, 0.00000);
    SetObjectMaterial(grass, 0, 17877, "landhub", "dirtKB_64HV");
    grass = CreateDynamicObject(8661, 163.92641, 1429.49438, 9.58880,   0.00000, 0.00000, 0.00000);
    SetObjectMaterial(grass, 0, 17877, "landhub", "dirtKB_64HV");
    grass = CreateDynamicObject(8661, 163.92641, 1412.45239, 9.59080,   0.00000, 0.00000, 0.00000);
    SetObjectMaterial(grass, 0, 17877, "landhub", "dirtKB_64HV");
    grass = CreateDynamicObject(8661, 246.07111, 1419.51489, -10.39270,   -0.09000, 90.00000, 270.00000);
    SetObjectMaterial(grass, 0, 17877, "landhub", "dirtKB_64HV");
    grass = CreateDynamicObject(19381, 225.75252, 1378.60693, 9.81440,   0.00000, 90.00000, 0.00000);
    SetObjectMaterial(grass, 0, 17877, "landhub", "dirtKB_64HV");
    grass = CreateDynamicObject(19381, 225.75369, 1388.24182, 9.81440,   0.00000, 90.00000, 0.00000);
    SetObjectMaterial(grass, 0, 17877, "landhub", "dirtKB_64HV");
    grass = CreateDynamicObject(19381, 215.25240, 1388.24182, 9.81440,   0.00000, 90.00000, 0.00000);
    SetObjectMaterial(grass, 0, 17877, "landhub", "dirtKB_64HV");
    grass = CreateDynamicObject(19381, 215.25240, 1378.60693, 9.81440,   0.00000, 90.00000, 0.00000);
    SetObjectMaterial(grass, 0, 17877, "landhub", "dirtKB_64HV");
And When I run the server it says :

Код:
[13:46:11] Script[gamemodes/core.amx]: Run time error 20: "Invalid index parameter (bad entry point)"
[13:46:11] Number of vehicle models: 3
But The server works, and the map works, it just doesn't show the texture.. Help?
Код:
new grass = CreateDynamicObject(8661, 239.54919, 1429.49438, 9.58680,   0.00000, 0.00000, 0.00000);
    SetDynamicObjectMaterial(grass, 0, 17877, "landhub", "dirtKB_64HV");
    grass = CreateDynamicObject(8661, 199.54930, 1429.49438, 9.58680,   0.00000, 0.00000, 0.00000);
    SetDynamicObjectMaterial(grass, 0, 17877, "landhub", "dirtKB_64HV");
    grass = CreateDynamicObject(8661, 163.92641, 1429.49438, 9.58880,   0.00000, 0.00000, 0.00000);
    SetDynamicObjectMaterial(grass, 0, 17877, "landhub", "dirtKB_64HV");
    grass = CreateDynamicObject(8661, 163.92641, 1412.45239, 9.59080,   0.00000, 0.00000, 0.00000);
    SetDynamicObjectMaterial(grass, 0, 17877, "landhub", "dirtKB_64HV");
    grass = CreateDynamicObject(8661, 246.07111, 1419.51489, -10.39270,   -0.09000, 90.00000, 270.00000);
    SetDynamicObjectMaterial(grass, 0, 17877, "landhub", "dirtKB_64HV");
    grass = CreateDynamicObject(19381, 225.75252, 1378.60693, 9.81440,   0.00000, 90.00000, 0.00000);
    SetDynamicObjectMaterial(grass, 0, 17877, "landhub", "dirtKB_64HV");
    grass = CreateDynamicObject(19381, 225.75369, 1388.24182, 9.81440,   0.00000, 90.00000, 0.00000);
    SetDynamicObjectMaterial(grass, 0, 17877, "landhub", "dirtKB_64HV");
    grass = CreateDynamicObject(19381, 215.25240, 1388.24182, 9.81440,   0.00000, 90.00000, 0.00000);
    SetDynamicObjectMaterial(grass, 0, 17877, "landhub", "dirtKB_64HV");
    grass = CreateDynamicObject(19381, 215.25240, 1378.60693, 9.81440,   0.00000, 90.00000, 0.00000);
    SetDynamicObjectMaterial(grass, 0, 17877, "landhub", "dirtKB_64HV");
Reply
#4

Quote:
Originally Posted by Puppy
Посмотреть сообщение
You need to use SetDynamicObjectMaterialEx since you are creating dynamic objects, and not standard server objects. As for the latter issue; it is probably because you don't have the main function in the gamemode script(core.pwn).

Simply add,
pawn Код:
main() { }
And it should work.
He has the main entry point since the server can run but the textures aren't displayed and also, there's no such function SetDynamicObjectMaterialEx, only SetDynamicObjectMaterial which is for dynamic objects.

And are you sure that "17877, "landhub", "dirtKB_64HV"" is a valid texture? Try to set a different texture to see if it actually works.

Try this for example, ""3922, "bistro", "mp_snow"".

Just use SetDynamicObjectMaterial and it'll work.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)