SetObjectMaterialText/SetObjectMaterial
#1

Well, SetObjectMaterialText/SetObjectMaterial must change texture of any object...But it's not.
There are some objects in GTA. They consist of two or bigger objects value. One of these object is 7971.

It consists of
Код:
vgnprlstation03 >> vgngassign98 >> vgngassign99,Omni405,Omni406
SetObjectMaterialText/SetObjectMaterial can't be used because materials' indexes are:
Код:
Material: 0 split: 0 Tex: roof06L256
Material: 0 split: 0 Alp: roof06L256
Material: 1 split: 1 Tex: ws_white_wall1
Material: 1 split: 1 Alp: ws_white_wall1
Material: 2 split: 2 Tex: concpanel_la
Material: 2 split: 2 Alp: concpanel_la
Material: 3 split: 3 Tex: vgnmetalwall4_256
Material: 3 split: 3 Alp: vgnmetalwall4_256
Material: 4 split: 4 Tex: vgnmetalwall6_256
Material: 4 split: 4 Alp: vgnmetalwall6_256
Material: 5 split: 5 Tex: conc_slabgrey_256128
Material: 5 split: 5 Alp: conc_slabgrey_256128
Material: 6 split: 6 Tex: curbyell_64H
Material: 6 split: 6 Alp: curbyell_64H
Material: 7 split: 7 Tex: gasstop1_256
Material: 7 split: 7 Alp: gasstop1_256
Material: 8 split: 8 Tex: gasstopwall1_256
Material: 8 split: 8 Alp: gasstopwall1_256
Material: 9 split: 9 Tex: vgndwntwnrf1_256
Material: 9 split: 9 Alp: vgndwntwnrf1_256
Material: 10 split: 10 Tex: ws_xenon_1
Material: 10 split: 10 Alp: ws_xenon_1
Material: 11 split: 11 Tex: ws_xenon_3
Material: 11 split: 11 Alp: ws_xenon_3
Material: 12 split: 12 Tex: Alumox64
Material: 12 split: 12 Alp: Alumox64
Material: 0 split: 0 Tex: ws_xenon_2
Material: 0 split: 0 Alp: ws_xenon_2
Material: 1 split: 1 Tex: Alumox64
Material: 1 split: 1 Alp: Alumox64
Material: 0 split: 0 Tex: ws_xenon_2
Material: 0 split: 0 Alp: ws_xenon_2
Material: 1 split: 1 Tex: Alumox64
Material: 1 split: 1 Alp: Alumox64
I think, it's weird thing....
P.s. Also this.
Reply
#2

You should provide the code snipped you used to change the material (if you tried).
Reply
#3

Quote:
Originally Posted by Drebin
Посмотреть сообщение
You should provide the code snipped you used to change the material (if you tried).
PHP код:
#define FILTERSCRIPT
#include <a_samp>
new obj;
new 
ind 0;
public 
OnFilterScriptInit()
{
    
obj CreateObject(7971150.688003540041715.081054687521.466999053955000);
    return 
1;
}
public 
OnPlayerCommandText(playerid,cmdtext[])
{
    if(!
strcmp(cmdtext,"/inc_ind",true))
    {
        
SetObjectMaterialText(obj,"TEST",ind,OBJECT_MATERIAL_SIZE_256x256,"Impact",32,false,0xFFFF0000,0xFFFFFFFF,1);
        new 
str[64];
        
format(str,sizeof(str),"Material index %d has been changed",ind);
        
SendClientMessage(playerid,-1,str);
        
ind++;
        return 
1;
    }
    return 
0;
}
public 
OnFilterScriptExit()
{
    
DestroyObject(obj);
    return 
1;

Object is near Zone 51. Try yourself...
Reply
#4

Too long, no answers...AYFKM?
Reply
#5

VegasW.ide states this:
Код:
anim
7971 ,vgnprtlstation03 ,vgnretail72 ,vegasW ,130 ,128 <<-- your object
7972 ,vgnboigashot10 ,vgwestboiga1 ,vegasW ,130 ,128
7973 ,vgnboigashot23 ,vgwestboiga1 ,vegasW ,130 ,128
end
It might be that SetObjectMaterial can't handle animated objects?
Reply
#6

Quote:
Originally Posted by Basssiiie
Посмотреть сообщение
VegasW.ide states this:
Код:
anim
7971 ,vgnprtlstation03 ,vgnretail72 ,vegasW ,130 ,128 <<-- your object
7972 ,vgnboigashot10 ,vgwestboiga1 ,vegasW ,130 ,128
7973 ,vgnboigashot23 ,vgwestboiga1 ,vegasW ,130 ,128
end
It might be that SetObjectMaterial can't handle animated objects?
Hm...I think, you're right
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)