SA-MP Forums Archive
Siren Problem with Vehicle - 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: Siren Problem with Vehicle (/showthread.php?tid=427070)



Siren Problem with Vehicle - Omirrow - 31.03.2013

"AttachObjectToVehicle" After how "EditObject" can I do?



Re: Siren Problem with Vehicle - Omirrow - 31.03.2013

help please.


Re: Siren Problem with Vehicle - Omirrow - 31.03.2013

Do not have that can help?
I do not want to flood: /



Re: Siren Problem with Vehicle - [CG]Milito - 31.03.2013

Explain us, What's the problem? Otherwise we can't help you


Re: Siren Problem with Vehicle - RajatPawar - 31.03.2013

pawn Код:
public OnPlayerEditObject(playerid, playerobject, objectid, response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ)
{
    new Float:oldX, Float:oldY, Float:oldZ,
        Float:oldRotX, Float:oldRotY, Float:oldRotZ;
    GetObjectPos(objectid, oldX, oldY, oldZ);
    GetObjectRot(objectid, oldRotX, oldRotY, oldRotZ);
    if(!playerobject) // If this is a global object, move it for other players
    {
        if(!IsValidObject(objectid)) return;
        MoveObject(objectid, fX, fY, fZ, 10.0, fRotX, fRotY, fRotZ);
    }
 
    if(response == EDIT_RESPONSE_FINAL)
    {
        // Get object co - ords
               // Attach object To vehicle
    }
 
   
}



Re: Siren Problem with Vehicle - Omirrow - 31.03.2013

Object movement, no problems "Attach" activated when "Offset" there comes a problem


Re: Siren Problem with Vehicle - Omirrow - 31.03.2013

pawn Код:
if(strcmp(cmd,"/siren",true) == 0)
    {
        if(DinamikFactionlar[Oyuncular[playerid][pFaction]][FactionTipi] == 1 || DinamikFactionlar[Oyuncular[playerid][pFaction]][FactionTipi] == 2 ||DinamikFactionlar[Oyuncular[playerid][pFaction]][FactionTipi] == 3)
        {
            if(!IsPlayerInAnyVehicle(playerid))
            {
            return 1;
            }
                new arac = GetPlayerVehicleID(playerid);
                    if(DinamikAraclar[arac][Siren1Durum] == 1)
                    {
                        DestroyObject(DinamikAraclar[arac][SirenObje1]);
                        DinamikAraclar[arac][Siren1Durum] = 0;
                        BilgiMesajiYolla(playerid,"Sireni kaldırdınız.");
                        return 1;
                    }
                    new Float: XKP, Float:YKP, Float:ZKP;
                    GetPlayerPos(playerid, XKP, YKP, ZKP);
                    DinamikAraclar[arac][SirenObje1] = CreateObject(18646,XKP,YKP,ZKP, 0.0, 0.0, 96.0);
                    DinamikAraclar[arac][Siren1Durum] = 1;
                    SirenDuzenliyor[playerid] = 1;
                            BilgiMesajiYolla(playerid,"Siren eklediniz.");
                    EditObject(playerid,DinamikAraclar[arac][SirenObje1]);
        }
    return 1;
    }
pawn Код:
public OnPlayerEditObject(playerid, playerobject, objectid, response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ)
{
    if(!IsValidObject(objectid)) return 1;
    new Float:oldX, Float:oldY, Float:oldZ;
    GetObjectPos(objectid, oldX, oldY, oldZ);
    switch(response)
    {
        case EDIT_RESPONSE_FINAL:
        {
            if(SirenDuzenliyor[playerid] == 1)
            {
            MoveObject(DinamikAraclar[GetPlayerVehicleID(playerid)][SirenObje1], fX, fY, fZ, 10.0, fRotX, fRotY, fRotZ);
            AttachObjectToVehicle(DinamikAraclar[GetPlayerVehicleID(playerid)][SirenObje1],GetPlayerVehicleID(playerid),fX,fY,fZ,fRotX,fRotY,fRotZ);
            SirenDuzenliyor[playerid] = 0;
            }
                        ......



Re: Siren Problem with Vehicle - Harti - 31.03.2013

We all love these guys coding in some weird languages ...


Re: Siren Problem with Vehicle - Omirrow - 31.03.2013

The problem is that there is a difference there offset the offset position of the different things that a normal object


Re: Siren Problem with Vehicle - Omirrow - 31.03.2013

Help please.