Object help - 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: Object help (
/showthread.php?tid=559713)
Object help -
Brandon001 - 24.01.2015
Hi!
I was on 1 server and I saw there 1 teasing. 1 one like this would be my need teasing. I think that his text lord is pulled over it however i don't know,that ,how it would be necessary to put it on it. Your help greet.
Picture:
http://kepfeltoltes.hu/view/150110/s...toltes.hu_.png
Re: Object help -
zaibaslr2 - 24.01.2015
Use SetObjectMaterial to change color and material of an object.
Re: Object help -
Brandon001 - 24.01.2015
C:\freeroam\filterscripts\mapok.pwn(7) : error 035: argument type mismatch (argument 7)
C:\freeroam\filterscripts\mapok.pwn(7) : error 001: expected token: ",", but found ";"
Quote:
public OnPlayerConnect(playerid)
{
SetObjectMaterial(CreateDynamicObject(19425, 419.20657, 2476.06299, 15.49705, 0, 6038, "lawwhitebuilds", "waterclear256", 0xFFFFFFFF);
return 1;
}
|
What may be the trouble at this?
Re: Object help -
zaibaslr2 - 24.01.2015
Quote:
Originally Posted by Brandon001
C:\freeroam\filterscripts\mapok.pwn(7) : error 035: argument type mismatch (argument 7)
C:\freeroam\filterscripts\mapok.pwn(7) : error 001: expected token: ",", but found ";"
What may be the trouble at this?
|
You must create object first.
pawn Код:
new Object = CreateObject();//create object here
SetObjectMaterial(Object,smth,smth);
Re: Object help -
Brandon001 - 24.01.2015
Unfortunately in the future good.
Picture:
http://kepfeltoltes.hu/view/150124/8...toltes.hu_.png
Quote:
public OnPlayerConnect(playerid)
{
new Obj = CreateObject(3080, 384.24054, 2485.88770, 15.46728, 0.00000, 0.00000, 0.00000);
SetObjectMaterial(Obj, 0, 8487, "ballyswater", "waterclear256", 0xFFFFFFFF);
return 1;
}
|
Re: Object help -
zaibaslr2 - 24.01.2015
Are you sure the specified texture is correct?
Re: Object help -
Brandon001 - 24.01.2015
I was watching on Inn:
http://textures.xyin.ws
Re: Object help -
zaibaslr2 - 24.01.2015
Try this then
pawn Код:
SetObjectMaterial(CreateObject(3080,384.24054,2485.88770,15.46728,0,0,0),0, 8487, "ballyswater", "waterclear256", 0xFFFFFFFF);
Re: Object help -
Brandon001 - 24.01.2015
Unfortunately not good. If you would be able to show something existing then somehow possibly I would realise it.
Re: Object help -
ReshiramZekrom - 24.01.2015
You have to put this code in OnGameModeInit or OnFilterScript Init or in a command! It doesn't make any sense in OnPlayerConnect
pawn Код:
new Obj = CreateDynamicObject(3080, 384.24054, 2485.88770, 15.46728, 0.00000, 0.00000, 0.00000);
SetDynamicObjectMaterial(Obj, 0, 8487, "ballyswater", "waterclear256", 0);