pawn Код:
/*===========================================================
=============================================================
======= Oh My DeathMatch! OMDM =========
======= Developer: whosHate aka TehHate =========
======= Game Mode: Team DeathMatch =========
======= Version: v0.1 =========
=============================================================
===========================================================*/
/*===========================================================
===== Enjoy this crap and leave credits if you edit ^^ ======
===========================================================*/
/*===========================================================
Changelog
- v0.1: First version of OMDM
===========================================================*/
#include <a_samp>
//======= Color Defines ===========
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_RED 0xFF0000AA
#define COLOR_GREEN 0x00FF00AA
#define COLOR_BLUE 0x0000FFAA
#define COLOR_GRAY 0xAFAFAFAA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_LIGHTBLUE 0x0AFFFFAA
#define COLOR_PURPLE 0xFF00FFAA
#define COLOR_ORANGE 0xFFBB00AA
//=================================
//====== Team Defines =============
#define TEAM_GROVE 0
#define TEAM_LSPD 1
#define TEAM_BALLAS 2
#define TEAM_FBI 3
//=================================
//============ ENUMS ==============
enum TeamCars
{
t11
t12
t13
t14
t21
t22
t23
t24
}
//==================================
//========== Variables =============
new gTeam[MAX_PLAYERS];
new Cars[TeamCars];
//==================================
main()
{
print("||========Oh My Deathmatch!=======||");
print("||OMDM Team Deathmatch by whosHate||");
print("||=============v0.1===============||");
}
public OnGameModeInit()
{
SetGameModeText("OMDM v0.1");
//============================= PLAYER CLASSES =========================================
AddPlayerClass(106,-183.5194,1090.8673,19.7422,52.6484,22,120,28,120,30,120); // Grove
AddPlayerClass(102,1607.0870,1815.6981,10.8203,193.8336,22,120,28,120,30,120); // Ballas
//======================================================================================
//=============================== VEHICLES ==================================
Cars[t11] = CreateVehicle(463,-168.0218,1079.2097,19.2757,359.2158,0,0,120);
//===========================================================================
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerTeamFromClass(playerid, classid);
{
if(classid == 0)
{
gTeam[playerid] = TEAM_GROVE;
return 1;
}
else if(classid == 1)
{
gTeam[playerid] = TEAM_BALLAS;
return 1;
}
}
SetPlayerToTeamColor(playerid)
{
if (gTeam[playerid] == TEAM_GROVE)
{
SetPlayerColor(playerid, COLOR_GREEN);
}
else if (gTeam[playerid] == TEAM_BALLAS)
{
SetPlayerColor(playerid, COLOR_PURPLE);
}
}
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)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
if(gTeam[playerid] == TEAM_GROVE)
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1090.8673, 19.7422, 52.6484);
return 1;
}
else if(gTeam[playerid] == TEAM_BALLAS)
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1815.6981, 10.8203, 193.8336);
return 1;
}
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/help", cmdtext, true, 4) == 0)
{
// Do something here
return 1;
}
return 0;
}
public OnVehicleSpawn(vehicleid)
{
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}
public OnPlayerText(playerid, text[])
{
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveCheckpoint(playerid)
{
return 1;
}
public OnPlayerEnterRaceCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveRaceCheckpoint(playerid)
{
return 1;
}
public OnRconCommand(cmd[])
{
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
return 1;
}
public OnObjectMoved(objectid)
{
return 1;
}
public OnPlayerObjectMoved(playerid, objectid)
{
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}
public OnVehicleMod(playerid, vehicleid, componentid)
{
return 1;
}
public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
return 1;
}
public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
return 1;
}
public OnPlayerExitedMenu(playerid)
{
return 1;
}
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
return 1;
}
public OnRconLoginAttempt(ip[], password[], success)
{
return 1;
}
public OnPlayerUpdate(playerid)
{
return 1;
}
public OnPlayerStreamIn(playerid, forplayerid)
{
return 1;
}
public OnPlayerStreamOut(playerid, forplayerid)
{
return 1;
}
public OnVehicleStreamIn(vehicleid, forplayerid)
{
return 1;
}
public OnVehicleStreamOut(vehicleid, forplayerid)
{
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
return 1;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 1;
}