Név: Jármû Lámpa Script
Kategória: CODE
Segített: ZyZu (Egy apróságba )
Készítette: citromhun
Készítési idõ: 1-2 perc #include < a_samp >
enum vAdat { LAMPA }
new vInfo[ MAX_VEHICLES ][ vAdat ];
new vehicleid;
#define PRESSED(%0) (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
#define NARANCS 0xff8c00AA
public OnPlayerKeyStateChange( playerid, newkeys, oldkeys )
{
new engine, lights, alarm, doors, bonnet, boot, objective;
if( PRESSED( KEY_SUBMISSION )) {
if( IsPlayerInAnyVehicle( playerid )) {
if( GetPlayerState( playerid ) == PLAYER_STATE_DRIVER ) {
if( vInfo[ vehicleid ][ LAMPA ] == 0 ) {
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vehicleid,engine,1,alarm,doors,bonnet,boot,objective);
SendClientMessage(playerid, NARANCS, \"Felkapcsoltad a lámpát!\");
vInfo[vehicleid][LAMPA] = 1;
} else {
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vehicleid,engine,0,alarm,doors,bonnet,boot,objective);
SendClientMessage(playerid, NARANCS, \"Lekapcsoltad a lámpát!\");
vInfo[vehicleid][LAMPA] = 0;
} } } }
return 1;
}