SA-MP Forums Archive
AttachObjectToVehicle doesn't works - 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: AttachObjectToVehicle doesn't works (/showthread.php?tid=415019)



AttachObjectToVehicle doesn't works - Louris - 11.02.2013

Код:
CMD:policija(playerid,params[])
{
SendClientMessage(playerid, 0xAA3333AA, "Uћdėta");
if(PlayerInfo[playerid][pPadmin] == 1)
SetPVarInt(playerid, "zasibys", zasibys = CreateObject(19483,0,0,0,0,0,0));
SetPVarInt(playerid, "zasibys2", zasibys2 = CreateObject(19483,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "zasibys"), GetPlayerVehicleID(playerid), -1.07, 0.0, 0.0, 0.0, 0.0, 180.0);
AttachObjectToVehicle(GetPVarInt(playerid, "zasibys2"), GetPlayerVehicleID(playerid), 1.07, 0.0, 0.0, 0.0, 0.0, 0.0);
SetObjectMaterialText(zasibys, "Policija", 0, OBJECT_MATERIAL_SIZE_256x128,\
"Arial", 32, 0, 0xFFFFFFFF, 0, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
SetObjectMaterialText(zasibys2, "Policija", 0, OBJECT_MATERIAL_SIZE_256x128,\
"Arial", 32, 0, 0xFFFFFFFF, 0, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
zasibys object doesn't attach, only zasibys2, why?


Re: AttachObjectToVehicle doesn't works - theomanking - 11.02.2013

Hmm, did you put #include <zcmd> at the top of the script!


Re: AttachObjectToVehicle doesn't works - Louris - 11.02.2013

Any ideas?