06.08.2012, 11:26
Quote:
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(7971, 150.68800354004, 1715.0810546875, 21.466999053955, 0, 0, 0);
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;
}