Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //==============================================================================
- // Starting Of the GameMode //
- //==============================================================================
- /*This GameMode is developed by Jordi Hoock Castro, (universe at Forums), i must
- accept, that this GameMode is a simple basic shit, but why i release it?, ok i
- started scripting like 4 days ago, and i want your critics, opinions, etc.. i
- did this For me, cause im scripting intensively during 4 days, all the day and
- all the night, i hope you enjoy it, and if not only say, how you like it, also
- structuring, etc..*/
- //==============================================================================
- // Includes
- //==============================================================================
- #include <a_samp>
- //==============================================================================
- // Defines
- //==============================================================================
- //--------------------------------
- // Colours
- //--------------------------------
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_GREEN 0x33AA33AA
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_LIGHTBLUE 0x00D0F6AA
- #define COLOR_PURPLE 0xA600F6AA
- #define COLOR_TUT 0xF6C861AA
- #define COLOR_ROYAL 0x00C1F6AA
- #define COLOR_CWHITE 0xE0FFFFAA
- //--------------------------------
- // Vehicles etc..
- //--------------------------------
- #define RESPAWN_TIME 1 // 1 minutes
- //--------------------------------
- // Third Party Applications
- //--------------------------------
- #define strtok
- //--------------------------------
- // Dialogs
- //--------------------------------
- #define D_Connect 1
- #define D_Help 2
- #define D_Rules 3
- //==============================================================================
- // Forwards
- //==============================================================================
- forward VehicleRespawn();
- //==============================================================================
- // Main
- //==============================================================================
- main()
- {
- print("\n----------------------------------");
- print(" Simple DM GameMode in Las Venturas");
- print("----------------------------------\n");
- }
- //==============================================================================
- // General
- //==============================================================================
- //-----------------------
- // Spawn Info
- //-----------------------
- public OnGameModeInit()
- {
- SetGameModeText("Las Venturas DM");
- AddPlayerClass(7, 2585.61, 2787.45, 15.23, 0, 46, 5, 26, 500, 18, 10);
- SetTimer("VehicleRespawn", RESPAWN_TIME * 60000, 1);
- //--------------------------------
- // Objects & Vehicles
- //--------------------------------
- AddStaticVehicleEx(563,2613.55175781,2724.36010742,37.42439270,0.00000000,-1,-1,15); //Raindance
- AddStaticVehicleEx(469,2625.35839844,2722.03222656,36.63864136,0.00000000,-1,-1,15); //Sparrow
- AddStaticVehicleEx(541,2549.69189453,2769.08520508,10.52031231,0.00000000,-1,-1,15); //Bullet
- AddStaticVehicleEx(415,2569.74877930,2768.83618164,10.66983414,0.00000000,-1,-1,15); //Cheetah
- AddStaticVehicleEx(562,2520.49267578,2768.54614258,10.57386208,0.00000000,-1,-1,15); //Elegy
- AddStaticVehicleEx(587,2520.52612305,2737.79443359,10.62297916,0.00000000,-1,-1,15); //Euros
- AddStaticVehicleEx(603,2545.29663086,2737.38232422,10.81565380,0.00000000,-1,-1,15); //Phoenix
- AddStaticVehicleEx(451,2569.80883789,2738.24755859,10.57735062,0.00000000,-1,-1,15); //Turismo
- CreateObject(10079,2537.09741211,2806.80053711,13.08204651,0.00000000,0.00000000,4.00000000); //object(pyr_top_sfe) (1)
- CreateObject(1263,2539.25854492,2817.72973633,12.97315216,0.00000000,0.00000000,0.00000000); //object(mtraffic3) (1)
- CreateObject(2690,2504.01586914,2780.96850586,12.28566360,0.00000000,0.00000000,0.00000000); //object(cj_fire_ext) (1)
- CreateObject(16613,2565.39062500,2823.93334961,26.82031250,0.00000000,0.00000000,206.00000000); //object(des_bigtelescope) (1)
- CreateObject(16093,2586.77172852,2788.29125977,14.10115719,0.00000000,0.00000000,0.00000000); //object(a51_gatecontrol) (1)
- }
- //-----------------------
- // Some Info Messages
- //-----------------------
- public OnPlayerConnect(playerid)
- {
- ShowPlayerDialogOnConnect(playerid);
- return 1;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- new message[128];
- format(message, 128, "You clicked on player %d", clickedplayerid);
- SendClientMessage(playerid, COLOR_YELLOW, message);
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- SendClientMessageToAll(COLOR_PURPLE, "A Player has die, RUN!");
- return 1;
- }
- //-----------------------
- // Whole Vehicle respawn system
- //-----------------------
- public VehicleRespawn() {
- SendClientMessageToAll(COLOR_LIGHTBLUE, "All Unused vehicles respawned");
- for(new i = 0; i < MAX_VEHICLES; i ++ ) {
- for(new o = 0; o < GetMaxPlayers(); o ++ ) {
- if(!IsPlayerConnected(o)) continue;
- if(IsAnyBodyInVehicle(i)) continue;
- SetVehicleToRespawn(i);
- }
- }
- return 1;
- }
- stock IsAnyBodyInVehicle(vid) {
- for(new i = 0; i < GetMaxPlayers(); i ++ ) {
- if(IsPlayerInVehicle(i, vid)) return 1;
- }
- return 0;
- }
- //==============================================================================
- // Dialogs
- //==============================================================================
- //-----------------------
- // General dialog Info
- //-----------------------
- ShowPlayerDialogOnConnect(playerid)
- {
- ShowPlayerDialog(playerid, D_Connect, DIALOG_STYLE_MSGBOX, "Hello There", "Hello Mate, This is an free opensource, basic DM server. You can download this script freely at www.sa-mp.com\nThis gamemode was created for personal purposing, not for professional.\n\nAlso enjoy the server, and respect de rules, more information at /help,\nTO START PLAYING CLICK ON SPAWN", "Accept", "Cancel");
- return 1;
- }
- ShowPlayerDialogHelpCommand(playerid)
- {
- ShowPlayerDialog(playerid, D_Help,DIALOG_STYLE_MSGBOX,"¿Some Help?","Here you have some commands for IG\n/rules - show the rules","Accept", "Cancel");
- return 1;
- }
- ShowPlayerDialogRulesCommand(playerid)
- {
- ShowPlayerDialog(playerid, D_Rules,DIALOG_STYLE_MSGBOX,"Rules","- Dont Flood/spamm the chat\n- Dont use any third application to modify the game content","Accept", "Cancel");
- return 1;
- }
- //==============================================================================
- // Commands
- //==============================================================================
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(!strcmp(cmdtext, "/help", true))
- {
- ShowPlayerDialogHelpCommand(playerid);
- return 1;
- }
- if(!strcmp(cmdtext, "/rules", true))
- {
- SendClientMessageToAll(COLOR_GREEN, "A player is reading rules, Thats Nice!, go and follow them, /rules.");
- ShowPlayerDialogRulesCommand(playerid);
- return 1;
- }
- }
- //==============================================================================
- // End of The Gamemode //
- //==============================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement