SA-MP Forums Archive
Problem with SetObjectMaterialText +REP - 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: Problem with SetObjectMaterialText +REP (/showthread.php?tid=602429)



Problem with SetObjectMaterialText +REP - YoussefHammad - 07.03.2016

here's the code
Код:
new sign = CreateDynamicObject(7905,2123.6392,1451.0635,19.0166,0,0,8.2);
SetObjectMaterialText(sign, ""green"Whatcha"yellow" lookin' "purple"at?", 0, OBJECT_MATERIAL_SIZE_256x128,"Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
its under OnGameModeInIt , there's no errors or anything , it used to work but now it just shows what the sign already has , doesnt display what i wrote on it so how can i solve it ?
Thanks


Re: Problem with SetObjectMaterialText +REP - RoboN1X - 07.03.2016

Use SetDynamicObjectMaterialText() ....
Код:
SetDynamicObjectMaterialText(sign, green"Whatcha"yellow" lookin' "purple"at?", 0, OBJECT_MATERIAL_SIZE_256x128,"Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);



Re: Problem with SetObjectMaterialText +REP - YoussefHammad - 07.03.2016

Alright i"ll try it , thanks (repped)


Re: Problem with SetObjectMaterialText +REP - YoussefHammad - 07.03.2016

argument type mismatch
Код:
	SetDynamicObjectMaterialText(sign, green"Whatcha"yellow" lookin' "purple"at?", 0, OBJECT_MATERIAL_SIZE_256x128,"Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);



Re: Problem with SetObjectMaterialText +REP - MicroKyrr - 07.03.2016

Parameter of SetDynamicObjectMaterialText
PHP код:
native SetDynamicObjectMaterialText(STREAMER_TAG_OBJECT objectidmaterialindex, const text[], materialsize OBJECT_MATERIAL_SIZE_256x128, const fontface[] = "Arial"fontsize 24bold 1fontcolor 0xFFFFFFFFbackcolor 0textalignment 0); 
You have no materialindex parameter


Re: Problem with SetObjectMaterialText +REP - YoussefHammad - 07.03.2016

Quote:
Originally Posted by MicroKyrr
Посмотреть сообщение
Parameter of SetDynamicObjectMaterialText
PHP код:
native SetDynamicObjectMaterialText(STREAMER_TAG_OBJECT objectidmaterialindex, const text[], materialsize OBJECT_MATERIAL_SIZE_256x128, const fontface[] = "Arial"fontsize 24bold 1fontcolor 0xFFFFFFFFbackcolor 0textalignment 0); 
You have no materialindex parameter
what variable does materialindex takes ? (i think its a stupid question but i dont really know)


Re: Problem with SetObjectMaterialText +REP - MicroKyrr - 07.03.2016

Quote:
Originally Posted by YoussefHammad
Посмотреть сообщение
what variable does materialindex takes ? (i think its a stupid question but i dont really know)
PHP код:
    SetDynamicObjectMaterialText(sign0green"Whatcha"yellow" lookin' "purple"at?"0OBJECT_MATERIAL_SIZE_256x128,"Arial"2800xFFFF82000xFF000000OBJECT_MATERIAL_TEXT_ALIGN_CENTER); 



Re: Problem with SetObjectMaterialText +REP - YoussefHammad - 07.03.2016

Thanks +repped