Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Basic deathmatch gamemode made by theuser!
- This gamemode is intended for "Newbie" Scripters!
- Its easy to follow and add more things"
- */
- #include <a_samp> // for samp things
- #include <zcmd> // commands
- new InGame[MAX_PLAYERS]; // If the player is currently in a dm session
- new NotAlive[MAX_PLAYERS]; // if the player is dead
- new Arena[MAX_PLAYERS]; // which arena is the player in (( only 1 by default add more if you wish ))
- main( ) { }
- //color defines:
- #define Z22_LIGHTGREEN 0x7CFC00AA
- #define Z22_YELLOW 0xFFFF00AA
- //server defines
- #define ScriptVersion "1.1"
- #define Website "websitehere"
- #define Teamspeak "teamspeakiphere"
- #define ServerName "Basic DM"
- public OnGameModeInit()
- {
- SetGameModeText(""ScriptVersion"");
- AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- printf("Gamemode Loaded");
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
- SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
- SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- SendClientMessage(playerid, Z22_YELLOW, "Welcome to "ServerName"");
- SendClientMessage(playerid, Z22_YELLOW, "Teamspeak: "Teamspeak"");
- SendClientMessage(playerid, Z22_YELLOW, "Website: "Website"");
- InGame[playerid] = 0;
- Arena[playerid] = 0; // puts the player into no arena change "0" to the arena number if you wish for players to spawn into dm session
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- if (NotAlive[playerid] == 1 &&
- Arena[playerid] == 3)
- {
- SetPlayerInterior(playerid, 3);
- SetPlayerPos(playerid, 288.745971, 169.350997, 1007.171875);
- SetPlayerVirtualWorld(playerid, 1);
- NotAlive[playerid] = 0;
- }
- return 1;
- }
- public OnPlayerDeath(playerid, killerid)
- {
- SetPlayerHealth(killerid, 100); //gives the player full health as a reward
- SetPlayerArmour(killerid, 100); //gives the player full armour as a reward
- NotAlive[playerid] = 1;
- return 1;
- }
- CMD:enterdm(playerid, params[]) // Puts the player into a dm session
- {
- InGame[playerid] = 1;
- Arena[playerid] = 3;
- SendClientMessage(playerid, Z22_LIGHTGREEN, "You have joined the DM zone!"); // when a player joins dm they will see this message
- SetPlayerInterior(playerid, 3);
- SetPlayerPos(playerid, 288.745971, 169.350997, 1007.171875);
- SetPlayerVirtualWorld(playerid, 1);
- SetPlayerHealth(playerid, 100);
- SetPlayerArmour(playerid, 100);
- GivePlayerWeapon(playerid, 24, 100000); // unlimited ammo
- GivePlayerWeapon(playerid, 25, 100000); // unlimited ammo
- return 1;
- }
- CMD:help(playerid, params [])
- {
- SendClientMessage(playerid, Z22_YELLOW, "Use /enterdm to join the deathmatch!");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement