SA-MP Forums Archive
SetObjectMaterial does not work? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: SetObjectMaterial does not work? (/showthread.php?tid=331980)



SetObjectMaterial does not work? - justsomeguy - 06.04.2012

Hello, I recently tried to use SetObjectMaterial, like this:
pawn Код:
new Grass[71];
    Grass[1] = CreateObject(17081, 392.34, -2857.71, 5.30,   0.00, 0.00, 0.00);
//69 more of them underneath here

    for(new i; i < 0; i++)
    {
        SetObjectMaterial(Grass[i], 0, 18334, "cs_forests", "grasstype4", 0);
    }
Now, this does not give any errors, nor warnings, but it still does not work, does anyone know why? If sow please tell/explain to me, and tell/explain how I should fix this.
Thanks in advance!


Re: SetObjectMaterial does not work? - HuSs3n - 06.04.2012

whats that
pawn Код:
for(new i; i < 0; i++)
try this

pawn Код:
for(new i=0; i < sizeof(Grass); i++)



Re: SetObjectMaterial does not work? - justsomeguy - 06.04.2012

Quote:
Originally Posted by HuSs3n
Посмотреть сообщение
whats that
pawn Код:
for(new i; i < 0; i++)
try this

pawn Код:
for(new i=0; i < sizeof(Grass); i++)
That, did not work