SA-MP Forums Create Object Behind Vehicle
 New Account Members List Search Today's Posts Mark Forums Read

 08/07/2012, 04:59 PM #1 Tigerkiller Gangsta     Join Date: May 2010 Posts: 744 Reputation: 25 Create Object Behind Vehicle Hello Community, im searching for an Solution: How can i Create a Object behind a Dune ? So its wayne if i stay to North or S ? I tryed it abit but failed can someone help me ? It's for a Lazeret Script pawn Code: `stock CreateLazeret(playerid, Float:vehiclelength){    new Float:x,Float:y,Float:z,Float:a;    new vID = GetPlayerVehicleID(playerid);    GetVehiclePos(vID, x, y, z);    GetPlayerFacingAngle(vID, a);    x += (vehiclelength* floatsin(-a, degrees));    y += (vehiclelength* floatcos(-a, degrees));    Object = CreateDynamicObject(1997, x, y-5.5, z-2.20, 0.0, 0.0, a, 0, 0);    //return IsPlayerInRangeOfPoint(playerid,radius,x,y,z);    return 1;}` __________________
 08/07/2012, 05:54 PM #2 ViniBorn Godfather     Join Date: Aug 2010 Location: Brasília Posts: 5,336 Reputation: 719 Re: Create Object Behind Vehicle Try replace pawn Code: `x += (vehiclelength* floatsin(-a, degrees));y += (vehiclelength* floatcos(-a, degrees));` With pawn Code: `x -= (vehiclelength* floatsin(-a, degrees));y -= (vehiclelength* floatcos(-a, degrees));` __________________ CONTATO: F A C E B O O K: @vinibornpawn GameMode = Modo de jogo = Masculino Colabore com os olhos de quem lê. Não diga "Minha GM"!
 08/07/2012, 06:31 PM #3 Tigerkiller Gangsta     Join Date: May 2010 Posts: 744 Reputation: 25 AW: Create Object Behind Vehicle Not working. Someone else has an idea ? __________________
 10/07/2012, 03:00 PM #4 Kar High-roller     Join Date: May 2010 Location: Black Asylum Posts: 3,182 Reputation: 504 Re: Create Object Behind Vehicle pawn Code: `stock CreateLazeret(playerid, Float:vehiclelength){    new Float:x, Float:y, Float:z, Float:angle, vID = GetPlayerVehicleID(playerid),        Float:sX, Float:sY, Float:sZ;    GetVehiclePos(vID, x, y, z);    GetPlayerFacingAngle(vID, angle);    GetVehicleModelInfo(GetVehicleModel(vID), VEHICLE_MODEL_INFO_SIZE, sX, sY, sZ);    sY /= 1.7;    y += (sY * floatcos(-angle, degrees));    Object = CreateDynamicObject(1997, x, y, z - 2.20, 0.0, 0.0, a, 0, 0);    //return IsPlayerInRangeOfPoint(playerid,radius,x,y,z);    return 1;}` __________________
 11/07/2012, 10:26 PM #5 Tigerkiller Gangsta     Join Date: May 2010 Posts: 744 Reputation: 25 AW: Create Object Behind Vehicle Not working - if i stand too North it wont works but if i stand too Sudth it works any other ideas please? i need it __________________
 12/07/2012, 12:31 AM #6 Kar High-roller     Join Date: May 2010 Location: Black Asylum Posts: 3,182 Reputation: 504 Re: Create Object Behind Vehicle What you mean that doesn't work?? tell me exactly what you want. __________________
 12/07/2012, 02:48 AM #7 Tigerkiller Gangsta     Join Date: May 2010 Posts: 744 Reputation: 25 AW: Create Object Behind Vehicle I want it so: If i type a Command -> And Object Spawns Behind the Dune (like a Container) -> The object is to always stand behind the dune, no matter which way I am. The code is up to now only if I am in the north, but I do not know why @****** Translator - Sorry - Hope you know what i mean __________________
 12/07/2012, 03:09 AM #8 Kar High-roller     Join Date: May 2010 Location: Black Asylum Posts: 3,182 Reputation: 504 Re: Create Object Behind Vehicle pawn Code: `stock CreateLazeret(playerid, Float:vehiclelength){    new Float:x, Float:y, Float:z, Float:angle, vID = GetPlayerVehicleID(playerid),        Float:sX, Float:sY, Float:sZ;    GetVehiclePos(vID, x, y, z);    GetPlayerFacingAngle(vID, angle);    GetVehicleModelInfo(GetVehicleModel(vID), VEHICLE_MODEL_INFO_SIZE, sX, sY, sZ);    sX /= 2.0;    sY /= 1.7;    x += (sX * floatsin(-angle, degrees));    y += (sY * floatcos(-angle, degrees));    Object = CreateDynamicObject(1997, x, y, z - 2.20, 0.0, 0.0, a, 0, 0);    //return IsPlayerInRangeOfPoint(playerid,radius,x,y,z);    return 1;}` try that __________________
 12/07/2012, 03:32 AM #9 Tigerkiller Gangsta     Join Date: May 2010 Posts: 744 Reputation: 25 AW: Create Object Behind Vehicle This one doesnt works too -.- __________________
 13/07/2012, 11:31 PM #10 Tigerkiller Gangsta     Join Date: May 2010 Posts: 744 Reputation: 25 AW: Create Object Behind Vehicle Bump - still need it __________________

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Newer Help Archive 1 23/03/2011 09:13 PM Gabe713 Help Archive 1 05/10/2009 04:12 PM Starskyyy Help Archive 19 04/03/2009 07:40 PM Starskyyy Help Archive 1 04/03/2009 04:02 PM

All times are GMT. The time now is 01:25 PM.

 -- (EN) English -- (RU) Русски Contact Us - SA-MP - Archive - Top