Код:
if(dialogid == DIALOG_DM)
{
if(response)
{
switch(listitem)
{
case 0:
{
if(PlayerJoinedDMZone[playerid] == 1)
{
SCM(playerid, 0xF81414, "Vec ste u DM zoni. Prvo kucajte /napustidm");
return 1;
}
PlayerJoinedDMZone[playerid] = 1;
new randomcoords = random(sizeof(DMSpawn));
SPP(playerid, DMSpawn[randomcoords][0], DMSpawn[randomcoords][1], DMSpawn[randomcoords][2]);
GivePlayerWeapon(playerid, 24, 100); //Deagle
GivePlayerWeapon(playerid, 25, 100); //Shotgun
GivePlayerWeapon(playerid, 26, 100); //Shawn Fff
GivePlayerWeapon(playerid, 28, 500); //Uzi
GivePlayerWeapon(playerid, 30, 100); //Ak 47
GivePlayerWeapon(playerid, 31, 50); //M4
SetPlayerArmour(playerid, 100);
SPH(playerid, 100);
SCM(playerid, 0xF81414, "Dobrodosli u DM zonu. Srecno :)");
}
case 1:
{
if(PlayerJoinedDMZone2[playerid] == 1)
{
SCM(playerid, 0xF81414, "Vec ste u DM zoni. Prvo kucajte /napustidm");
return 1;
}
PlayerJoinedDMZone2[playerid] = 1;
new randomcoords = random(sizeof(DMSpawn2));
SPP(playerid, DMSpawn2[randomcoords][0], DMSpawn2[randomcoords][1], DMSpawn2[randomcoords][2]);
GivePlayerWeapon(playerid, 24, 100); //Deagle
GivePlayerWeapon(playerid, 25, 100); //Shotgun
GivePlayerWeapon(playerid, 26, 100); //Shawn Fff
GivePlayerWeapon(playerid, 28, 500); //Uzi
GivePlayerWeapon(playerid, 30, 100); //Ak 47
GivePlayerWeapon(playerid, 31, 50); //M4
SetPlayerArmour(playerid, 100);
SPH(playerid, 100);
SCM(playerid, 0xF81414, "Dobrodosli u DM zonu. Srecno :)");
}
}
}
}
return 1;
}
Here it is. And it works perfect. And player can't rejoin the DM while he is in it unless he types /napustidm (/leavedm). Thank you guys