Object - 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 (
/showthread.php?tid=587263)
Object -
SumX - 29.08.2015
Hello, I have a command wich attaches me an object. Why the object is not showing?
On top of the script, the definition:
PHP код:
new Matura[MAX_PLAYERS];
In the command:
PHP код:
Matura[playerid] = CreateObject(1778, 0.0,0.0,0.0,1.7350, 0.0, 0.0, 0.0);
AttachObjectToPlayer(Matura[playerid], playerid, -0.2, 0.15, -1, 0, 0, -90);
Re: Object -
VoltMeter - 29.08.2015
Try changing all instances of "CreateObject" to "CreateDynamicObject". It usually works in most cases.
Re: Object -
Dorito - 29.08.2015
It attaches perfectly for me, no problems at all. I just tried it through an I-ZCMD command:
Код:
new Matura[MAX_PLAYERS];
CMD:test(playerid,params[])
{
Matura[playerid] = CreateObject(1778, 0.0,0.0,0.0,1.7350, 0.0, 0.0, 0.0);
AttachObjectToPlayer(Matura[playerid], playerid, -0.2, 0.15, -1, 0, 0, -90);
return CMD_SUCCESS;
}