Üdv kedves fórumozóknak Készítettem egy \"DM Systemet\" Ha mondhatom ennek
Pár kép róla
http://kepfeltoltes.hu/130510/1023071167sa-mp-018_www.kepfeltoltes.hu_.png[/img]
http://kepfeltoltes.hu/130510/814241740sa-mp-019_www.kepfeltoltes.hu_.png[/img]
http://kepfeltoltes.hu/130510/985660595sa-mp-020_www.kepfeltoltes.hu_.png[/img]
http://kepfeltoltes.hu/130510/121772002sa-mp-021_www.kepfeltoltes.hu_.png[/img]
http://kepfeltoltes.hu/130510/1242545698sa-mp-022_www.kepfeltoltes.hu_.png[/img]
http://kepfeltoltes.hu/130510/342038251sa-mp-023_www.kepfeltoltes.hu_.png[/img]
http://kepfeltoltes.hu/130510/sa-mp-024_www.kepfeltoltes.hu_.png[/img]
Újítások várhatóak :
Új DM-ek PL_: Derby DM , Arena DM , Terror DM , M4DM2 karantén DM
Csatlakozáskor kiírja a DM-ben lévõk számát mindenkinek
PWN:
/*
==============
-DM System =
=
-Verzió 1.0 =
========
Készítõ: ]FreePlay[ =
===========================
Elkészítési idõ: 30 perc (Tesztelésel együtt)=
=
www.sampforum.hu =
===============================================
*/
/*
====================================
Következõ verzióban várható_: =
=
==================================
Új DM-ek PL_: Derby DM , Arena DM , Terror DM , M4DM2 karantén DM =
Csatlakozáskor kiírja a DM-ben lévõk számát mindenkinek =
=====================================================================
*/
#include <a_samp>
#include <zcmd>
#include <sscanf2>
#pragma tabsize 0
static FREEDM[MAX_PLAYERS]={ -1, ... };
#define COLOR_TENGER 0x00a6ffAA
#define COLOR_SÁRGA 0xfff700AA
#define COLOR_PIROS 0xff0000AA
//Dialog Define
#define DIALOG_DMEK 2013
//Sawndm RANDOM
new Float:RandomDM[6][3] =
{
{1305.2129,2191.8435,11.0234},
{1390.3733,2107.3083,11.0156},
{1390.5880,2192.2305,11.0234},
{1305.4147,2107.0833,11.0156},
{1356.1439,2196.3647,11.0234},
{1350.9719,2105.7046,11.0156}
};
//M4DM RANDOM
new Float:RandomDM2[9][3] =
{
{-32.1949,48.3527,3.1172},
{-34.2015,51.4968,3.1094},
{-39.6453,53.1995,6.4844},
{-92.7494,-23.9238,3.1172},
{-60.0644,52.9396,6.4766},
{-58.9392,-32.4063,3.1172},
{-62.3151,-43.0170,3.1172},
{-121.2243,-101.2563,3.1181},
{-74.4122,-103.9932,3.1181}
};
//SniperDM
new Float:RandomDM3[6][3] =
{
{2705.4529,2716.8281,12.8222},
{2605.1272,2687.8218,10.8203},
{2671.2771,2749.1133,10.8203},
{2613.0930,2734.4707,36.5386},
{2630.9536,2725.3049,23.8222},
{2647.3257,2767.6680,10.8203}
};
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print(\"\\n--------------------------------------\");
print(\"DM System BY: ]FreePlay[ Verzió 1.0\");
print(\"--------------------------------------\\n\");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print(\"\\n----------------------------------\");
print(\" DM System BY: ]FreePlay[ Verzió 1.0\");
print(\"----------------------------------\\n\");
}
#endif
public OnPlayerConnect(playerid)
{
FREEDM[playerid] = -1;
SendClientMessage(playerid,COLOR_TENGER,\"A szerveren ]FreePlay[ DM-Rendszere üzemel\");
SendClientMessage(playerid,COLOR_TENGER,\"DM Zónákért : /dms\");
return 1;
}
public OnPlayerSpawn(playerid)
{
switch(FREEDM[playerid])
{
case 0:
{
new rand = random(sizeof(RandomDM));
SetPlayerPos(playerid, RandomDM[rand][0], RandomDM[rand][1],RandomDM[rand][2]);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,26,1);
SetPlayerHealth(playerid,100);
SetPlayerArmour(playerid,100);
SetPlayerVirtualWorld(playerid,2);
}
case 1:
{
new rand = random(sizeof(RandomDM2));
SetPlayerPos(playerid, RandomDM2[rand][0], RandomDM2[rand][1],RandomDM2[rand][2]);
ResetPlayerWeapons(playerid);
SetPlayerHealth(playerid,25);
GivePlayerWeapon(playerid,31,100);
SetPlayerVirtualWorld(playerid,3);
}
case 2:
{
ResetPlayerWeapons(playerid);
new rand = random(sizeof(RandomDM3));
SetPlayerPos(playerid, RandomDM3[rand][0], RandomDM3[rand][1],RandomDM3[rand][2]);
SetPlayerPos(playerid,1379.3,-28.2,30.0);
GivePlayerWeapon(playerid,20,100);
SetPlayerHealth(playerid,5);
SetPlayerVirtualWorld(playerid,4);
}
}
return 1;
}
//SawnDM
CMD:sawndm(playerid,params[])
{
if(FREEDM[playerid] == 0) return SendClientMessage(playerid,COLOR_PIROS,\"Te már DM-zónában vagy : /exitdm\");
new rand = random(sizeof(RandomDM));
SetPlayerPos(playerid, RandomDM[rand][0], RandomDM[rand][1],RandomDM[rand][2]);
FREEDM[playerid] = 0;
new pName[30], string[128];
GetPlayerName(playerid, pName, 30);
format(string, 256, \"%s csatlakozot a Sawn DM-hez belépés: (/sawndm)\", pName);
SendClientMessageToAll(COLOR_SÁRGA,string);
SetPlayerVirtualWorld(playerid,2);
GivePlayerWeapon(playerid,26,6789);
SendClientMessage(playerid,COLOR_TENGER,\"Csatlakoztál a Sawn DM-hez\");
return 1;
}
//M4DM
CMD:m4dm(playerid,params[])
{
if(FREEDM[playerid] == 0) return SendClientMessage(playerid,COLOR_PIROS,\"Te már DM-zónában vagy : /exitdm\");
new rand = random(sizeof(RandomDM2));
SetPlayerPos(playerid, RandomDM2[rand][0], RandomDM2[rand][1],RandomDM2[rand][2]);
FREEDM[playerid] = 1;
new pName[30], string[128];
SetPlayerHealth(playerid,25);
GetPlayerName(playerid, pName, 30);
format(string, 256, \"%s csatlakozot az M4DM-hez belépés: (/m4dm)\", pName);
SendClientMessageToAll(COLOR_SÁRGA,string);
SetPlayerVirtualWorld(playerid,3);
GivePlayerWeapon(playerid,31,9990);
SendClientMessage(playerid,COLOR_TENGER,\"Csatlakoztál az M4DM -hez\");
return 1;
}
//Sniperdm
CMD:sniperdm(playerid,params[])
{
if(FREEDM[playerid] == 0) return SendClientMessage(playerid,COLOR_PIROS,\"Te már DM-zónában vagy : /exitdm\");
new rand = random(sizeof(RandomDM3));
SetPlayerPos(playerid, RandomDM3[rand][0], RandomDM3[rand][1],RandomDM3[rand][2]);
FREEDM[playerid] = 2;
ShowPlayerMarkers(true);
SetPlayerHealth(playerid,5);
SetPlayerVirtualWorld(playerid,4);
new pName[30], string[128];
GetPlayerName(playerid, pName, 30);
format(string, 256, \"%s csatlakozot a Sniper DM-hez belépés: (/sniperdm)\", pName);
SendClientMessageToAll(COLOR_SÁRGA,string);
GivePlayerWeapon(playerid,34,100);
SendClientMessage(playerid,COLOR_TENGER,\"Csatlakoztál a SniperDM -hez\");
return 1;
}
//Kilépés Parancs
CMD:exitdm(playerid,params[])
{
if(FREEDM[playerid] == -1) return SendClientMessage(playerid,COLOR_PIROS, \"Nem tartózkodsz DM-zónában\");
SetPlayerVirtualWorld(playerid,0);
FREEDM[playerid] = -1;
ShowPlayerMarkers(false);
return SendClientMessage(playerid,COLOR_SÁRGA,\"Kiléptél a DeathMatch zónából.\");
}
CMD:dms(playerid,params[])
{
if(FREEDM[playerid] == 0) return SendClientMessage(playerid,COLOR_PIROS,\"Te már DM-zónában vagy : /exitdm\");
ShowPlayerDialog(playerid, DIALOG_DMEK, DIALOG_STYLE_LIST, \"DM-Zónák\", \"Sawn DM\\nM4DM\\nSniperDM\", \"Csatlakozás\", \"Mégsem\");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_DMEK)
{
if(response)
{
if(listitem == 0) //Sawn DM
{
new rand = random(sizeof(RandomDM));
SetPlayerPos(playerid, RandomDM[rand][0], RandomDM[rand][1],RandomDM[rand][2]);
FREEDM[playerid] = 0;
new pName[30], string[128];
GetPlayerName(playerid, pName, 30);
format(string, 256, \"%s csatlakozot a Sawn DM-hez belépés: (/sawndm)\", pName);
SendClientMessageToAll(COLOR_SÁRGA,string);
SetPlayerVirtualWorld(playerid,2);
GivePlayerWeapon(playerid,26,6789);
SendClientMessage(playerid,COLOR_TENGER,\"Csatlakoztál a Sawn DM-hez\");
}
if(listitem == 1) //M4DM
{
new rand = random(sizeof(RandomDM2));
SetPlayerPos(playerid, RandomDM2[rand][0], RandomDM2[rand][1],RandomDM2[rand][2]);
FREEDM[playerid] = 1;
new pName[30], string[128];
GetPlayerName(playerid, pName, 30);
format(string, 256, \"%s csatlakozot az M4DM-hez belépés: (/m4dm)\", pName);
SendClientMessageToAll(COLOR_SÁRGA,string);
SetPlayerVirtualWorld(playerid,3);
GivePlayerWeapon(playerid,31,9990);
SendClientMessage(playerid,COLOR_TENGER,\"Csatlakoztál az M4DM -hez\");
}
if(listitem == 2) //SniperDM
{
new rand = random(sizeof(RandomDM));
SetPlayerPos(playerid, RandomDM[rand][0], RandomDM[rand][1],RandomDM[rand][2]);
FREEDM[playerid] = 2;
SetPlayerVirtualWorld(playerid,4);
new pName[30], string[128];
GetPlayerName(playerid, pName, 30);
format(string, 256, \"%s csatlakozot a KDM-hez belépés: (/kdm)\", pName);
SendClientMessageToAll(COLOR_SÁRGA,string);
GivePlayerWeapon(playerid,34,100);
ShowPlayerMarkers(false);
SendClientMessage(playerid,COLOR_TENGER,\"Csatlakoztál a Kartantén DM -hez\");
}
}
return 1;
}
return 0;
}
Tudom nem nagy de valakinek biztos hasznára lesz és a következõ verzió kicsit hasznosabb is lesz majd