04.12.2010, 19:04
Guys i have problem with attaching objects to vehicle and players...
here is the codes:
please someone post one code but to be right...
Thanks.
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;
}
Thanks.