problem with AttachObjectToPlayer and to Vehicle -
Rafa - 04.12.2010
Guys i have problem with attaching objects to vehicle and players...
here is the codes:
pawn Код:
if(strcmp(cmdtext, "/lights", true) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
new neon, vehic, Float:x, Float:y, Float:z;
neon = CreateObject(18648, x,y,z, 0, 0, 0, 200.0);
vehic = GetPlayerVehicleID(playerid);
AttachObjectToVehicle(neon, vehic, 0.0, 0.0, 2.0, 0,0,0);
return 1;
}
}
pawn Код:
if(strcmp(cmdtext, "/attach", true) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
new veh, obj;
obj = CreateObject(1609, 0,0,0,0,0,0, 200);
veh = GetPlayerVehicleID(playerid);
AttachObjectToVehicle(obj, veh, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0);
}
return 1;
}
pawn Код:
if(strcmp(cmdtext, "/pattach", true) == 0)
{
new player, objc, Float:X, Float:Y, Float:Z;
objc = CreateObject(1609, 0,0,0,0,0,0, 200);
player = GetPlayerPos(playerid, X, Y, Z);
AttachObjectToPlayer(objc, player, 1.5, 0.5, 0, 0, 1.5, 2);
return 1;
}
please someone post one code but to be right...
Thanks.
Re: problem with AttachObjectToPlayer and to Vehicle -
Rafa - 04.12.2010
someone help please...
![Huh?](images/smilies/confused.gif)
:S
Re: problem with AttachObjectToPlayer and to Vehicle -
Retardedwolf - 04.12.2010
pawn Код:
if(strcmp(cmdtext, "/pattach", true) == 8)
{
new objc, Float:X, Float:Y, Float:Z;
objc = CreateObject(1609, 0,0,0,0,0,0, 200);
player = GetPlayerPos(playerid, X, Y, Z);
AttachObjectToPlayer(objc, playerid, 1.5, 0.5, 0, 0, 1.5, 2);
return 1;
}
if(strcmp(cmdtext, "/attach", true) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
new obj;
obj = CreateObject(1609, 0,0,0,0,0,0, 200);
AttachObjectToVehicle(obj, GetPlayerVehicleID ( playerid ), 0.0, 0.0, 0.0, 1.0, 0.0, 0.0);
}
return 1;
}
if(strcmp(cmdtext, "/lights", true) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
new neon, Float:x, Float:y, Float:z;
neon = CreateObject(18648, x,y,z, 0, 0, 0, 200.0);
AttachObjectToVehicle(neon, GetPlayerVehicleID ( playerid ), 0.0, 0.0, 2.0, 0,0,0);
return 1;
}
}
Re: problem with AttachObjectToPlayer and to Vehicle -
kacper55331 - 04.12.2010
pawn Код:
if(strcmp(cmdtext, "/pattach", true) == 8)
{
SetPlayerAttachedObject(playerid, 1, 1609, 1, 1.5, 0.5, 0, 0, 1.5, 2);
return 1;
}
So it should be OK
Re: problem with AttachObjectToPlayer and to Vehicle -
Rafa - 05.12.2010
nope the objects dont work :S
Re: problem with AttachObjectToPlayer and to Vehicle -
Rafa - 06.12.2010
so noone can help me ? :S
(sorry for double post)