AttachObjectToVehicle BUG?
#1

Hi, if I put this into my gamemode I receive the message but the object doesn't appear... do you know anything about this bug?
Код:
   if(strcmp("/blueneon", cmdtext, true) == 0)
	{
		new neon = CreateObject(18648,0,0,0,0,0,0,100.0);
		new neon1 = CreateObject(18648,0,0,0,0,0,0,100.0);
		AttachObjectToVehicle(neon, GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
		AttachObjectToVehicle(neon1, GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
		SendClientMessage(playerid, COLOR_WHITE, "Neones Instalados!");
		return 1;
	}
Reply
#2

this question noone knows and i post 2 topics with this questions but noone answer it and i think that code didnt work :S
Reply
#3

Could be the rotation. For example, the default block object from single player (with lights), if you rotate the object, the lights won't light up.
Try without a roation.

Also, what if the player types:
/neonazul /neonazul /neonazul /neonazul /neonazul /neonazul /neonazul /neonazul /neonazul /neonazul /neonazul
You should think more about protecting the other players and server limits.
Код:
new neon[MAX_PLAYERS], neon2[MAX_PLAYERS];
Код:
if(strcmp("/neonazul", cmdtext, true) == 0)
{
	if(neon[playerid])DestroyObject(neon[playerid]), neon[playerid] = 0;
	if(neon2[playerid])DestroyObject(neon2[playerid]), neon2[playerid] = 0;
	neon[playerid] = CreateObject(18648,0,0,0,0,0,0,100.0);
	neon2[playerid] = CreateObject(18648,0,0,0,0,0,0,100.0);
	AttachObjectToVehicle(neon[playerid], GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
	AttachObjectToVehicle(neon2[playerid], GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
	SendClientMessage(playerid, COLOR_WHITE, "Neones Instalados!");
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)