Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //============================================================================//
- // //
- // SCRIPT EXCLUSIVO PARA PAWNOSCRIPTING.COM //
- // //
- // >-- DESCRIPCION PARA VEHICULOS <-- //
- // //
- //============================================================================//
- //============================================================================//
- // //
- // CREADO POR <ØTACØN> DESDE 0 //
- // //
- // FECHA DE INICIO DEL SCRIPT 29/01/2012 //
- // ---------------------- //
- // FECHA DE FINALIZACION DEL SCRIPT 29/01/2012 //
- // //
- // PROHIBIDO ROBAR CREDITOS //
- // //
- // ACTUALIZACION 10/02/2012 //
- // //
- // Agregado: Cuando El Vehiculo Explota, //
- // Si tiene Descripcion es Eliminada. //
- // //
- // Agregado: Cuando El Player Sale Del Servidor, //
- // La Descripcion Del Vehiculo Es Eliminada. //
- // //
- //============================================================================//
- //============================================================================//
- // INCLUDEs //
- //============================================================================//
- #include <a_samp>
- //============================================================================//
- // DEFINESs //
- //============================================================================//
- #define COLOR_VERDE 0x19793AFF
- #define COLOR_BLANCO 0xFFFFFFFF
- #define COLOR_GRIS 0x74777EFF
- #define COLOR_ROSA 0x9516D0FF
- #define MENU_DESCRIPCION 6241
- #define MENU_DESCRIPCION_2 3210
- //============================================================================//
- // NEWs //
- //============================================================================//
- new
- string[50],
- Activar_Descripcion[MAX_VEHICLES],
- Text3D:Descripcion[MAX_VEHICLES],
- Death[MAX_VEHICLES]
- ;
- //============================================================================//
- // >-- DESCRIPCION PARA VEHICULOS <-- //
- //============================================================================//
- public OnFilterScriptInit()
- {
- print("\n|---------------------------------------|");
- print("| Filescript por <ØTACØN> |");
- print("| Descripcion Para Vehiculo -- Cargado |");
- print("|-----------------------------------------|\n");
- return 1;
- }
- //============================================================================//
- // >-- DESCRIPCION PARA VEHICULOS <-- //
- //============================================================================//
- public OnFilterScriptExit()
- {
- print("\n|---------------------------------------|");
- print("| Filescript por <ØTACØN> |");
- print("| Descripcion Para Vehiculo -- Cerrado |");
- print("|-----------------------------------------|\n");
- return 1;
- }
- //============================================================================//
- // >-- DESCRIPCION PARA VEHICULOS <-- //
- //============================================================================//
- public OnPlayerConnect(playerid)
- {
- for(new i=0; i<MAX_VEHICLES; i++)
- {
- Death[i] = 0;
- }
- return 1;
- }
- //============================================================================//
- // >-- DESCRIPCION PARA VEHICULOS <-- //
- //============================================================================//
- public OnPlayerDisconnect(playerid, reason)
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- if(Death[vehicleid] >= 1)
- {
- Delete3DTextLabel(Descripcion[vehicleid]);
- Activar_Descripcion[vehicleid] = 0;
- Death[vehicleid] = 0;
- }
- return 1;
- }
- //============================================================================//
- // >-- DESCRIPCION PARA VEHICULOS <-- //
- //============================================================================//
- public OnVehicleDeath(vehicleid)
- {
- if(Death[vehicleid] >= 1)
- {
- Delete3DTextLabel(Descripcion[vehicleid]);
- Activar_Descripcion[vehicleid] = 0;
- Death[vehicleid] = 0;
- }
- return 1;
- }
- //============================================================================//
- // >-- DESCRIPCION PARA VEHICULOS <-- //
- //============================================================================//
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == MENU_DESCRIPCION)
- {
- if(response)
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- if(strlen(inputtext) != 0)
- {
- if(Activar_Descripcion[vehicleid] == 0)
- {
- format(string, sizeof(string), "- %s -", inputtext);
- Descripcion[vehicleid] = Create3DTextLabel(string, COLOR_ROSA, 30.0, 40.0, 5.0, 40.0, 1);
- Attach3DTextLabelToVehicle( Descripcion[vehicleid], vehicleid, 0.0, 0.0, 1.2);
- SendClientMessage(playerid, COLOR_GRIS, " [ ! ] Usted Ha Puesto Una Descripcion Al Vehiculo!.");
- SendClientMessage(playerid, COLOR_GRIS, " [ ! ] Escribe: /BorrarDescripcion Para Borrar La Descripcion Actual!.");
- Activar_Descripcion[vehicleid] = 1;
- Death[vehicleid] = 1;
- format(string, sizeof(string), " [ - ] La Descripcion Del Vehiculo Dice: %s",inputtext);
- SendClientMessage(playerid, COLOR_BLANCO, string);
- return 1;
- }
- }
- else
- {
- format(string, sizeof(string), "{ffffff}Escribe Una Descripcion Para Tu Vehiculo:");
- ShowPlayerDialog(playerid,MENU_DESCRIPCION,DIALOG_STYLE_INPUT,"Descripcion del Vehiculo:",string,"Escribir","Cerrar");
- }
- }
- }
- //============================================================================//
- // >-- DESCRIPCION PARA VEHICULOS <-- //
- //============================================================================//
- if(dialogid == MENU_DESCRIPCION_2)
- {
- if(response)
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- if(Activar_Descripcion[vehicleid] == 1)
- {
- Delete3DTextLabel(Descripcion[vehicleid]);
- Activar_Descripcion[vehicleid] = 0;
- Death[vehicleid] = 0;
- SendClientMessage(playerid, COLOR_VERDE, " [ ! ] Usted Ha Borrado La Descripcion Del Vehiculo!.");
- return 1;
- }
- }
- }
- return 1;
- }
- //============================================================================//
- // >-- DESCRIPCION PARA VEHICULOS <-- //
- //============================================================================//
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/BorrarDescripcionV", cmdtext, true, 10) == 0)
- {
- if(!IsPlayerInAnyVehicle(playerid))
- {
- SendClientMessage(playerid, COLOR_VERDE, " [ ! ] Usted No Se Encuentra En Un Vehiculo.");
- return 1;
- }
- if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
- {
- SendClientMessage(playerid, COLOR_VERDE, " [ ! ] Usted No Esta Como Conductor del Vehiculo.");
- return 1;
- }
- new vehicleid = GetPlayerVehicleID(playerid);
- if(Activar_Descripcion[vehicleid] == 1)
- {
- format(string, sizeof(string), "{ffffff}¿Desea Borrar La Descripcion Del Vehiculo?");
- ShowPlayerDialog(playerid,MENU_DESCRIPCION_2,DIALOG_STYLE_MSGBOX,"Descripcion del Vehiculo:",string,"Borrar","Cerrar");
- return 1;
- }
- }
- //============================================================================//
- // >-- DESCRIPCION PARA VEHICULOS <-- //
- //============================================================================//
- if (strcmp("/DescripcionV", cmdtext, true, 10) == 0)
- {
- if(!IsPlayerInAnyVehicle(playerid))
- {
- SendClientMessage(playerid, COLOR_VERDE, " [ ! ] Usted No Se Encuentra En Un Vehiculo.");
- return 1;
- }
- if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
- {
- SendClientMessage(playerid, COLOR_VERDE, " [ ! ] Usted No Esta Como Conductor del Vehiculo.");
- return 1;
- }
- new vehicleid = GetPlayerVehicleID(playerid);
- if(Activar_Descripcion[vehicleid] == 0)
- {
- format(string, sizeof(string), "{ffffff}Escribe Una Descripcion Para Tu Vehiculo:");
- ShowPlayerDialog(playerid,MENU_DESCRIPCION,DIALOG_STYLE_INPUT,"Descripcion del Vehiculo:",string,"Escribir","Cerrar");
- return 1;
- }
- }
- return 1;
- }
- //============================================================================//
- // >-- DESCRIPCION PARA VEHICULOS <-- //
- //============================================================================//
- //============================================================================//
- // SI TE SIRVIO RESPETA EL TRABAJO DEL CREADOR //
- // //
- //=========================FINAL DEL FILESCRIPT===============================//
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement