I need to make second function on this code, but got an error. Help please!
#1

Hello guys, how i can make second fucntion of command? The first function is so it attach object to vehicle, but i want to do when player type it again and on car is already this item it will destroy it, while I tried to make it i got this.

Errors:
C:\Users\Jakub\Desktop\Server\gamemodes\LVRP.pwn(3 65) : error 029: invalid expression, assumed zero
C:\Users\Jakub\Desktop\Server\gamemodes\LVRP.pwn(3 71) : warning 225: unreachable code
C:\Users\Jakub\Desktop\Server\gamemodes\LVRP.pwn(3 71) : warning 217: loose indentation


pawn Код:
Variable:
new VehicleObject[1];


COMMAND:majak(playerid, cmdtext[])
{
    {
        VehicleObject[0] = CreateObject(18646,0,0,-1000,0,0,0,100);
        AttachObjectToVehicle(VehicleObject[0], 541, 0.449999,0.674999,0.375000,0.000000,0.000000,0.000000);
    }
    else //365 line
    {
        DestroyObject(VehicleObject[0]);
    }
    return 1;
   
return 1; //371 line
}
THANKS.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)