hello all nekem va negy dm rendszerem amibe nem tom h ha ujjat csinálok kell megadni dm-id az eslõnél 0 akkor a következõnek 1-nek kelle lennie vagy nem kell megadni
Dm:
[pawn]#include <a_samp>
#include <zcmd>
#define COLOR_RED 0xFF0000AA
static dmid[MAX_PLAYER_NAME]={ -1};
new Float:RandomM4DM[][] =
{
{712.6943,911.0870,-18.6518},
{628.4692,895.2729,-41.1028},
{449.2429,910.5845,-8.4908},
{542.3502,926.3947,-39.1521},
{565.5638,817.2322,-29.8604}
};
public OnFilterScriptInit()
{
print(\"\\n--------------------------------------\");
print(\" Dm script By: Gabor...\");
print(\"--------------------------------------\\n\");
return 1;
}
public OnFilterScriptExit()
{
print(\"Dm script kikapcsolva\");
return 1;
}
public OnPlayerConnect(playerid)
{
dmid[playerid] = -1;
return 1;
}
public OnPlayerDisconnect(playerid)
{
dmid[playerid] = -1;
return 1;
}
public OnPlayerSpawn(playerid)
{
switch(dmid[playerid])
{
case 0:
{
new rand = random(sizeof(RandomM4DM));
SetPlayerPos(playerid, RandomM4DM[rand][0], RandomM4DM[rand][1], RandomM4DM[rand][2]);
SetPlayerFacingAngle(playerid,90.0);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,31,99999);
SetPlayerVirtualWorld(playerid,2);
}
default: // Alap spawn
{
GivePlayerMoney(playerid,500);
GivePlayerWeapon(playerid,5,500);
GivePlayerWeapon(playerid,31,1000);
GivePlayerWeapon(playerid,29,1000);
SetPlayerVirtualWorld(playerid,0);
}
}
return 1;
}
// Dm parancs (zcmd-ben)
CMD:m4dm(playerid, params[])
{
dmid[playerid] = 0;
SpawnPlayer(playerid);
SendClientMessage(playerid,COLOR_RED,\"M4 DM zónába léptél!\");
GivePlayerWeapon(playerid,31,99999);
return 1;
}
CMD:exitdm(playerid, params[])
{
if(dmid[playerid] == -1) return SendClientMessage(playerid,0xbc0000, \"{\"#FF0000\"}Hiba: {\"#FFFFFF\"}Nem vagy DMben!\");
dmid[playerid] = -1;
SpawnPlayer(playerid);
return SendClientMessage(playerid,0xbc0000,\"Kiléptél a DeathMatch zónából.\");
}[/pawn]