27.06.2012, 13:44
pawn Код:
if(strcmp(cmd, "/engine", true) == 0)
{
if ( !IsPlayerInAnyVehicle ( playerid ) ) return SendClientMessage ( playerid , -1 , "[LVehicle]:You Are Not In An Vehicle!" ) ;
new vid = GetPlayerVehicleID ( playerid ) ;
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx ( vid , engine , lights , alarm , doors , bonnet , boot , objective ) ;
if ( !IsValidVehicleID ( vid ) ) return SendClientMessage ( playerid , -1 , "[LVehicle]:That Is An Invalid Vehicle!" ) ;
if ( !IsVehicleStreamedIn ( vid , playerid ) ) return SendClientMessage ( playerid , -1 , "[LVehicle]:This Vehicle Dosent Seems To Be Streamed In!, Contact An Administrator ASAP!" ) ;
else
{
switch(engine){
case 1:
{
SetVehicleParamsEx ( vid , 0 , lights , alarm , doors , bonnet , boot , objective ) ;
SendClientMessage ( playerid , -1 , "[LVehicle]:Engine Off!" ) ;
}
default:
{
SetVehicleParamsEx ( vid , 1 , lights , alarm , doors , bonnet , boot , objective ) ;
SendClientMessage ( playerid , -1 , "[LVehicle]:Engine On" ) ;
}
}
}
return 1;
}
Y u no move to ZCMD?