Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Xevo - Vehicle Control by Angix
- */
- #define VEHICLE_PARAMS_OFF 0
- #define FILTERSCRIPT
- #include <a_samp>
- #define VEHICLE_PARAMS_ON 1
- #define COLOR_BLUE 0x00a8ff
- #define COLOR_GREEN 0x0be600
- #define COLOR_RED 0xff0000
- #define VEHICLE_PARAMS_UNSET -1
- #define CAR1 1337
- #define CAR2 1338
- #define CAR3 1339
- #define CAR4 1400
- #define CAR5 1401
- #define CAR6 1402
- #define CAR7 1403
- new engine,lights,alarm,doors,bonnet,boot,objective;
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print("--- Veicoli Control by Angix -----");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- SendClientMessage(playerid, COLOR_GREEN, "Questo server utilizza lo xevo auto system, by Angix");
- SendClientMessage(playerid, COLOR_RED, "Utilizza /automenu");
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/automenu", cmdtext, true, 10) == 0)
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
- {
- SendClientMessage(playerid, COLOR_RED, "Non sei il proprietario del veicolo.");
- return 1;
- }
- ShowPlayerDialog(playerid, CAR1, DIALOG_STYLE_LIST, "Xevo Veicoli Control - By Angix","Motore\nFari\nCofano\nCofano2\nAllarme\nPorte","Seleziona","Annulla");
- }
- else
- {
- SendClientMessage(playerid, COLOR_BLUE, "Non hai un veicolo, compralo alla concessionaria!");
- return 1;
- }
- return 1;
- }
- return 0;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- if(newstate == PLAYER_STATE_DRIVER)
- {
- SendClientMessage(playerid, COLOR_GREEN, "Usa: /automenu > e scegli un componente del dialogo.");
- return 1;
- }
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == CAR5)
- {
- if(response)
- {
- new vid = GetPlayerVehicleID(playerid);
- GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
- SetVehicleParamsEx(vid,engine,lights,alarm,doors,VEHICLE_PARAMS_ON,boot,objective);
- SendClientMessage(playerid, COLOR_GREEN, "Il tuo cofano2 è aperto!");
- }
- if(!response)
- {
- new vid = GetPlayerVehicleID(playerid);
- GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
- SetVehicleParamsEx(vid,engine,lights,alarm,doors,VEHICLE_PARAMS_OFF,boot,objective);
- SendClientMessage(playerid, COLOR_RED, "Il tuo cofano2 è chiuso!");
- }
- }
- if(dialogid == CAR6)
- {
- if(response)
- {
- new vid = GetPlayerVehicleID(playerid);
- GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
- SetVehicleParamsEx(vid,engine,lights,VEHICLE_PARAMS_ON,doors,bonnet,boot,objective);
- SendClientMessage(playerid, COLOR_BLUE, "Il tuo allarme è attivato!");
- }
- if(!response)
- {
- new vid = GetPlayerVehicleID(playerid);
- GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
- SetVehicleParamsEx(vid,engine,lights,VEHICLE_PARAMS_OFF,doors,bonnet,boot,objective);
- SendClientMessage(playerid, COLOR_RED, "Il tuo allarme è disattivato!");
- }
- }
- if(dialogid == CAR7)
- {
- if(response)
- {
- new vid = GetPlayerVehicleID(playerid);
- GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
- SetVehicleParamsEx(vid,engine,lights,alarm,VEHICLE_PARAMS_OFF,bonnet,boot,objective);
- SendClientMessage(playerid, COLOR_BLUE, "Il tuo veicolo è chiuso!");
- }
- if(!response)
- {
- new vid = GetPlayerVehicleID(playerid);
- GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
- SetVehicleParamsEx(vid,engine,lights,alarm,VEHICLE_PARAMS_ON,bonnet,boot,objective);
- SendClientMessage(playerid, COLOR_BLUE, "Il tuo veicolo è aperto!");
- }
- }
- if(dialogid == CAR2)
- {
- if(response)
- {
- new vid = GetPlayerVehicleID(playerid);
- GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
- SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
- SendClientMessage(playerid, COLOR_BLUE, "Il motore della tua auto è accesso!");
- }
- if(!response)
- {
- new vid = GetPlayerVehicleID(playerid);
- GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
- SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
- SendClientMessage(playerid, COLOR_GREEN, "Il motore della tua auto è spento!");
- }
- }
- if(dialogid == CAR3)
- {
- if(response)
- {
- new vid = GetPlayerVehicleID(playerid);
- GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
- SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_ON,alarm,doors,bonnet,boot,objective);
- SendClientMessage(playerid, COLOR_BLUE, "I fari tua auto sono accessi!");
- }
- if(!response)
- {
- new vid = GetPlayerVehicleID(playerid);
- GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
- SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);
- SendClientMessage(playerid, COLOR_RED, "I fari della tuo auto sono spenti! ");
- }
- }
- if(dialogid == CAR4)
- {
- if(response)
- {
- new vid = GetPlayerVehicleID(playerid);
- GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
- SetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,VEHICLE_PARAMS_ON,objective);
- SendClientMessage(playerid, COLOR_RED, "Apri il cofano della tua auto!");
- }
- if(!response)
- {
- new vid = GetPlayerVehicleID(playerid);
- GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
- SetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,VEHICLE_PARAMS_OFF,objective);
- SendClientMessage(playerid, COLOR_BLUE, "Chiudi il cofano della tua auto!");
- }
- }
- if(dialogid == CAR1)
- {
- if(response)
- {
- if(listitem == 0)
- {
- ShowPlayerDialog(playerid, CAR2, DIALOG_STYLE_MSGBOX, "Motore","Accendi/Spegni il motore delle tua auto.","Accendi","Spegni");
- }
- if(listitem == 1)
- {
- ShowPlayerDialog(playerid, CAR3, DIALOG_STYLE_MSGBOX, "Fari","Accendi/Spegni i fari della tua auto! ","Accendi","Spegni");
- }
- if(listitem == 2)
- {
- ShowPlayerDialog(playerid, CAR4, DIALOG_STYLE_MSGBOX, "Cofano","Apri/Chiudi il cofano della tua auto!","Open","Close");
- }
- if(listitem == 3)
- {
- ShowPlayerDialog(playerid, CAR5, DIALOG_STYLE_MSGBOX, "Cofano2","Apri/Chiudi il cofano della tua auto!","Apri","Chiudi");
- }
- if(listitem == 4)
- {
- ShowPlayerDialog(playerid, CAR6, DIALOG_STYLE_MSGBOX, "Allarme","Attiva/Disattiva l'allarme della tua auto!","Attiva","Disattiva");
- }
- if(listitem == 5)
- {
- ShowPlayerDialog(playerid, CAR7, DIALOG_STYLE_MSGBOX, "Porte","Apri/Chiudi le porte della tua auto!","Chiudi","Apri");
- }
- }
- }
- return 1;
- }
- // ---------- Xevo Auto byA Angix AnD Alex ------------------- //
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement