Siren Problem with Vehicle
#1

"AttachObjectToVehicle" After how "EditObject" can I do?
Reply
#2

help please.
Reply
#3

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

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

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
    }
 
   
}
Reply
#6

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

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;
            }
                        ......
Reply
#8

We all love these guys coding in some weird languages ...
Reply
#9

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

Help please.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)