Tessék, egy olyan verzió, amivel beléphetsz a dm-be, kiírja csetbe. Ha meghalsz akkor vissza tesz a dm-be!
Mód elejére:
static minigundm[MAX_PLAYERS]={ -1, ... };
OnPlayerConnect alá:
minigundm = -1
OnPlayerSpawn alá:
if(minigundm[playerid] == 0)
{
SetPlayerPos(playerid, X, Y, Z);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 38, 9999);
}
else
{
//FONTOS, IDE ÍRD AZT, AMI ALAPBÓL AZ ONPLAYERSPAWN ALATT VOLT!!!!!!
}
Parancsokhoz:
if (strcmp(\"/minigundm\", cmdtext, true) == 0)
{
minigundm[playerid] = 0;
SendClientMessage(playerid,0xffffffff,\"Beléptél a Minigun DM-be!\");
new name[MAX_PLAYER_NAME+1], string[24+MAX_PLAYER_NAME+1];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), \"%s belépett a MinigunDM-be!\", name);
SendClientMessageToAll(0xffffffff, string);
SpawnPlayer(playerid);
return 1;
}
if (strcmp(\"/exitdm\", cmdtext, true) == 0)
{
if(minigundm[playerid] == -1) return SendClientMessage(playerid,0xffffffff, \"DM-ben kell lenned!\");
minigundm[playerid] = -1;
SpawnPlayer(playerid);
return SendClientMessage(playerid,0xffffffff,\"Kiléptél a DeathMatch zónából.\");
}else if(minigundm[playerid] != -1) return SendClientMessage(playerid,0xffffffff,\"Elõbb lépj ki a dm-bõl!\");