problem with the new engine system...
#1

guys i have problem with the new engine system i have copy and past in my pawn but idk doesn't work...

pawn Код:
if(strcmp(cmdtext, "/startengine", true) == 0)
    {
        new vid = GetPlayerVehicleID(playerid);
        if(vid != INVALID_VEHICLE_ID)
        {
            GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
            SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
        }
        return 1;
    }
    if(strcmp(cmdtext, "/stopengine", true) == 0)
    {
        new vid = GetPlayerVehicleID(playerid);
        if(vid != INVALID_VEHICLE_ID)
        {
            GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
            SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
        }
        return 1;
    }
and i have some defines up in my script...

pawn Код:
#define MAX_PLAYER_ATTACHED_OBJECTS 5 // This is the number of attached indexes available ie 5 = 0-4
#define SetPlayerHoldingObject(%1,%2,%3,%4,%5,%6,%7,%8,%9) SetPlayerAttachedObject(%1,MAX_PLAYER_ATTACHED_OBJECTS-1,%2,%3,%4,%5,%6,%7,%8,%9)
#define StopPlayerHoldingObject(%1) RemovePlayerAttachedObject(%1,MAX_PLAYER_ATTACHED_OBJECTS-1)
#define IsPlayerHoldingObject(%1) IsPlayerAttachedObjectSlotUsed(%1,MAX_PLAYER_ATTACHED_OBJECTS-1);
#define VEHICLE_PARAMS_UNSET    -1
#define VEHICLE_PARAMS_OFF  0
#define VEHICLE_PARAMS_ON   1
EDIT: and with the attach vehicle... :/
pawn Код:
if(strcmp(cmdtext, "/attach", true) == 0)
    {
        new veh;
        veh = GetPlayerVehicleID(playerid);
        AttachObjectToVehicle(2985, veh, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0);
        return 1;
    }
here all copy and paste in the pawn..
please help
Thanks
Reply
#2

some1 help :/
Reply
#3

pawn Код:
new engine,lights,alarm,doors,bonnet,boot,objective;
Reply
#4

yes i have that and dont work :/
Sorry forget to add it
Reply
#5

guyssss anyone heelpp !!!
Reply
#6

Add
pawn Код:
ManualVehicleEngineAndLights();
to OnGameModeInit()

Also remove following defines:
pawn Код:
#define VEHICLE_PARAMS_UNSET    -1
#define VEHICLE_PARAMS_OFF  0
#define VEHICLE_PARAMS_ON   1
No need for those...
Reply
#7

AttachObjectToVehicle(UNIQUEIDOFTHEOBJECT,UNIQUEID OFTHEVEHICLE,xt,yt,zt,20,20,20);

So like

new obj = CreateObject(1337, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
AttachObjectToVehicle(obj,idofthevehicle,xt,yt,zt, 20,20,20);
Reply
#8

Quote:
Originally Posted by Auxxx
Посмотреть сообщение
Also remove following defines:
pawn Код:
#define VEHICLE_PARAMS_UNSET    -1
#define VEHICLE_PARAMS_OFF  0
#define VEHICLE_PARAMS_ON   1
No need for those...
If he prefers to use them, let him use them? :P
Reply
#9

ok so what if i delite this

pawn Код:
#define VEHICLE_PARAMS_UNSET    -1
#define VEHICLE_PARAMS_OFF  0
#define VEHICLE_PARAMS_ON   1
Reply
#10

Quote:
Originally Posted by Rafa
Посмотреть сообщение
ok so what if i delite this

pawn Код:
#define VEHICLE_PARAMS_UNSET    -1
#define VEHICLE_PARAMS_OFF  0
#define VEHICLE_PARAMS_ON   1
Nothing? Just take a look at my filterscript, and you'll understand me

Код:
This forum requires that you wait 120 seconds between posts. Please try again in 62 seconds."]This forum requires that you wait 120 seconds between posts. Please try again in 62 seconds.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)