hlp , romve attach objet to vehicle
#1

Hi

i make this cmd

pawn Код:
if (strcmp("/meh", cmdtext, true, 10) == 0)
    {
        new Float:x, Float:y, Float:z;
        GetVehiclePos(meh, x, y, z);
        {
            new aaa, bbb;
            aaa = CreateObject(2893, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
            bbb = CreateObject(2893, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
            AttachObjectToVehicle(aaa, meh, 0.90480, -5.56730, -0.24820,   0.00000, 0.00000, 0.00000);
            AttachObjectToVehicle(bbb, meh, 0.90480, -5.56730, -0.24820,   0.00000, 0.00000, 0.00000);
        }
        return 1;
    }
    if (strcmp("/mehh", cmdtext, true, 10) == 0)
    {
        new Float:x, Float:y, Float:z;
        GetVehiclePos(meh, x, y, z);
        {
            new aaa, bbb;
            DestroyObject(aaa);
            DestroyObject(bbb);
            aaa = CreateObject(2893, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
            bbb = CreateObject(2893, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
            AttachObjectToVehicle(aaa, meh, 0.90480, -5.56730, -0.24820,   90.00000, 0.00000, 0.00000);
            AttachObjectToVehicle(bbb, meh, 0.90480, -5.56730, -0.24820,   90.00000, 0.00000, 0.00000);
        }
        return 1;
    }
i want if player use /mehh romve attach obje to vehicle /meh
Reply
#2

Change
new aaa, bbb;
to global variable.
Reply
#3

Quote:
Originally Posted by newbienoob
Посмотреть сообщение
Change
new aaa, bbb;
to global variable.
Ok , thanks i fix it
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)