29.11.2010, 09:25
(
Последний раз редактировалось Rafa; 29.11.2010 в 09:42.
)
guys i have problem with the new engine system i have copy and past in my pawn but idk doesn't work...
and i have some defines up in my script...
EDIT: and with the attach vehicle... :/
here all copy and paste in the pawn..
please help
Thanks
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;
}
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
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;
}
please help
Thanks
