SA-MP Forums Archive
problem with the new engine system... - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: problem with the new engine system... (/showthread.php?tid=194389)



problem with the new engine system... - Rafa - 29.11.2010

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


Re: problem with the new engine system... - Rafa - 29.11.2010

some1 help :/


Re: problem with the new engine system... - WillyP - 29.11.2010

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



Re: problem with the new engine system... - Rafa - 29.11.2010

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


Re: problem with the new engine system... - Rafa - 29.11.2010

guyssss anyone heelpp !!!


Re: problem with the new engine system... - Auxxx - 29.11.2010

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...


Re: problem with the new engine system... - Memoryz - 29.11.2010

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);


Re: problem with the new engine system... - Jochemd - 30.11.2010

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


Re: problem with the new engine system... - Rafa - 01.12.2010

ok so what if i delite this

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



Re: problem with the new engine system... - Auxxx - 01.12.2010

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.