PLEASE, HELP. - 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: PLEASE, HELP. (
/showthread.php?tid=209784)
PLEASE, HELP. -
Gh0sT_ - 11.01.2011
Why this engine script don't work? When I enter the car with off engine, I get: Maљinos variklis uћkūrtas( IN ENG: Vehicle engine is ON ). When I try to turn it on( lol ) and sometimes get succesfully - engine is off.....
pawn Код:
if( HOLDING( KEY_CROUCH ) )
{
if( IsPlayerInAnyVehicle( playerid ) && GetPlayerState( playerid ) == PLAYER_STATE_DRIVER )
{
new
Masina = GetPlayerVehicleID( playerid )
;
if( GetVehicleModel( Masina ) != 481 || GetVehicleModel( Masina ) != 509 || GetVehicleModel( Masina ) != 510 )
{
new
Float: Gyvybes
;
GetVehicleHealth( Masina, Gyvybes );
GetVehicleParamsEx( Masina, Variklis, Lempos, Signalizacija, Uzrakinimas, Kapotas, Bagazine, Lempute );
if( Gyvybes < 650 ) return SendClientMessage( playerid, -1, ""#h_Balta"Maрina yra "#h_Raudona"per daug sudauюyta" );
if( Variklis )
{
SendClientMessage( playerid, -1, ""#h_Balta"[ > ] "#h_Geltona"Maрinos variklis "#h_Raudona"uюgesintas" );
SetVehicleParamsEx( Masina, false, Lempos, Signalizacija, Uzrakinimas, Kapotas, Bagazine, Lempute );
}
if( ! Variklis )
{
SendClientMessage( playerid, -1, ""#h_Balta"[ > ] "#h_Geltona"Maрinos variklis "#h_Raudona"kuriamas" );
SetTimerEx( "MasinosVariklis", 4500, false, "d", playerid, Masina );
}
}
}
}
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if( newstate == PLAYER_STATE_DRIVER )
{
new
Masina = GetPlayerVehicleID( playerid )
;
GetVehicleParamsEx( Masina, Variklis, Lempos, Signalizacija, Uzrakinimas, Kapotas, Bagazine, Lempute );
if( Variklis ) SendClientMessage( playerid, -1, ""#h_Balta"[ > ] "#h_Geltona"Maрinos variklis yra "#h_Raudona"UЮKЫRTAS. "#h_Orandzine"Sekmлs kelyje!" );
else if( ! Variklis ) SendClientMessage( playerid, -1, ""#h_Balta"[ > ] "#h_Geltona"Maрinos variklis yra "#h_Zalia"NEUЮЫRTAS. "#_Geltona"Spauskite "#h_Orandzine"H." );
}
return 1;
}
pawn Код:
forward MasinosVariklis( playerid, vehicleid );
public MasinosVariklis( playerid, vehicleid )
{
if( MasinuDB[ vehicleid ][ Degalai ] == 0 ) return SendClientMessage( playerid, -1, ""#h_Balta"[ > ] "#h_Geltona"Maрinoje "#h_Raudona"nлra "#h_Geltona"degalш" );
new
Random = random( 4 )
;
GetVehicleParamsEx( vehicleid, Variklis, Lempos, Signalizacija, Uzrakinimas, Kapotas, Bagazine, Lempute );
if( Random == 0 || Random == 1 && ! Variklis )
{
SetVehicleParamsEx( vehicleid, true, Lempos, Signalizacija, Uzrakinimas, Kapotas, Bagazine, Lempute );
SendClientMessage( playerid, -1, ""#h_Balta"[ > ] "#h_Geltona"Variklis "#h_Zalia"sлkmingai uюsikыrл." );
}
if( Random == 2 || Random == 3 )
{
SendClientMessage( playerid, -1, ""#h_Balta"[ > ] "#h_Geltona"Variklis "#h_Raudona"neuюsikыrл." );
}
return true;
}
Re: PLEASE, HELP. -
Gh0sT_ - 11.01.2011
oh, buumppp..
Re: PLEASE, HELP. -
Marricio - 11.01.2011
maybe use vars
Re: PLEASE, HELP. -
Gh0sT_ - 12.01.2011
What you mean with this?
Re: PLEASE, HELP. -
Gh0sT_ - 12.01.2011
lmfao, help.