/* Vehicle Headlight\'s Filterscript Toggle you vehicles lights on/off Created by: Anwix (http://forum.sa-mp.com/index.php?action=profile;u=12730) Thanks to: ~ JernejL (RedShirt) - Encode Lights Script */#include <a_samp>new bool: VehicleLightsOn[MAX_VEHICLES];new panels, doors, lights, tires;#define PRESSED(%0) \\ (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))public OnFilterScriptInit(){ print(\"\\n--------------------------------------\"); print(\" Vehicle Lights Filterscript Loaded\"); print(\"--------------------------------------\\n\"); for (new x = 1; x < MAX_VEHICLES; x++) { VehicleLightsOn
#include a_samp#include zcmdCMD:lampa(playerid, params[]){if(IsPlayerInAnyVehicle(playerid)){new vehicleid = GetPlayerVehicleID(playerid);new engine, lights, alarm, doors, bonnet, boot, objective;GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);if(lights == 1){SetVehicleParamsEx(vehicleid, engine, 0, alarm, doors, bonnet, boot, objective);SendClientMessage(playerid,-1, \"Lámpa Kikapcsolva\");}else{SetVehicleParamsEx(vehicleid, engine, 1, alarm, doors, bonnet, boot, objective);SendClientMessage(playerid,-1,\"Lámpa Bekapcsolva\");}}else{SendClientMessage(playerid,-1, \"Ez Kocsi Parancs!\");}return 1;}
Szejvusz!! #include a_samp#include zcmdCMD:lampa(playerid, params[]){if(IsPlayerInAnyVehicle(playerid)){new vehicleid = GetPlayerVehicleID(playerid);new engine, lights, alarm, doors, bonnet, boot, objective;GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);if(lights == 1){SetVehicleParamsEx(vehicleid, engine, 0, alarm, doors, bonnet, boot, objective);SendClientMessage(playerid,-1, \"Lámpa Kikapcsolva\");}else{SetVehicleParamsEx(vehicleid, engine, 1, alarm, doors, bonnet, boot, objective);SendClientMessage(playerid,-1,\"Lámpa Bekapcsolva\");}}else{SendClientMessage(playerid,-1, \"Ez Kocsi Parancs!\");}return 1;} NEM Teszteltem
hát igy kéne strcmp,cmd script kéne
#include a_samppublic OnPlayerCommandText(playerid, cmdtext[]){if(strcmp(cmdtext, \"/lampa\", true) == 0){if(IsPlayerInAnyVehicle(playerid)){new vehicleid = GetPlayerVehicleID(playerid);new engine, lights, alarm, doors, bonnet, boot, objective;GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);if(lights == 1){SetVehicleParamsEx(vehicleid, engine, 0, alarm, doors, bonnet, boot, objective);SendClientMessage(playerid,-1, \"Lámpa Kikapcsolva\");}else{SetVehicleParamsEx(vehicleid, engine, 1, alarm, doors, bonnet, boot, objective);SendClientMessage(playerid,-1,\"Lámpa Bekapcsolva\");}}else{SendClientMessage(playerid,-1, \"Ez Kocsi Parancs!\");}return 1;}return 0;}