#1

I want to block the dialog when the player is in deathmatch

Код:
CMD:w(playerid,params[])
{
    if(God[playerid] == 0)
    {
        ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, "Weapons List", "{FFFFFF}Pistols\n{FFFFFF}Sub-       Machine Guns\n{FFFFFF}Shotguns\n{FFFFFF}Assault Rifles\n{FFFFFF}Melee Weapons", "Select", "Cancel");
    }
}
But i already blocked it for one thing so how will i block it for dm too?
Reply
#2

If you have like /dm then create it in virtual world, and block dialog if player is in that virtual world
Reply
#3

Quote:
Originally Posted by NeamPojma
Посмотреть сообщение
If you have like /dm then create it in virtual world, and block dialog if player is in that virtual world
I already made dm in virtual world and i already tested it but with indm[playerid]

Код:
CMD:w(playerid,params[])
{
    if(God[playerid] == 0)
    {
        ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, "Weapons List", "{FFFFFF}Pistols\n{FFFFFF}Sub-Machine Guns\n{FFFFFF}Shotguns\n{FFFFFF}Assault Rifles\n{FFFFFF}Melee Weapons", "Select", "Cancel");
    }
    else GameTextForPlayer(playerid, "~g~You godmod is enabled ~n~~w~use /god to disable it",4500,3);
    if(indm[playerid] >= 1) return GameTextForPlayer(playerid,"~g~you are not in freeroam",4500,3);
    return 1;
}
but not worked
Reply
#4

anyone help please
Reply
#5

deleted...
Reply
#6

Even I had not understand his problem
Reply
#7

pawn Код:
CMD:w(playerid,params[])
{
    if(God[playerid] != 0)
    {
        GameTextForPlayer(playerid, "~g~You godmod is enabled ~n~~w~use /god to disable it",4500,3);
        return 1;
    }
    if(indm[playerid] >= 1)
    {
       GameTextForPlayer(playerid,"~g~you are not in freeroam",4500,3);
        return 1;
    }
    ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, "Weapons List", "{FFFFFF}Pistols\n{FFFFFF}Sub-Machine Guns\n{FFFFFF}Shotguns\n{FFFFFF}Assault Rifles\n{FFFFFF}Melee Weapons", "Select", "Cancel");
    return 1;
}
if that what you mean
Reply
#8

I think he wants to block a command from being used if they're either in a DM part of the server or if they're in a current fight.

You use variables to either determine what part of the server they're in. (I have no clue what you mean still.)
Reply
#9

1. way
Код:
CMD:w(playerid,params[])
{
    if(God[playerid] == 1 || indm[playerid] ) return GameTextForPlayer(playerid, "~g~You godmod is enabled ~n~~w~use /god to disable it~n~or you are in DM",4500,3);
        ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, "Weapons List", "{FFFFFF}Pistols\n{FFFFFF}Sub-       Machine Guns\n{FFFFFF}Shotguns\n{FFFFFF}Assault Rifles\n{FFFFFF}Melee Weapons", "Select", "Cancel");
}
2. way

Код:
CMD:w(playerid,params[])
{
    if(God[playerid] == 1) return GameTextForPlayer(playerid, "~g~You godmod is enabled ~n~~w~use /god to disable it",4500,3);
    if( indm[playerid]  == 1)return GameTextForPlayer(playerid, "You cannot use  /god in DM",4500,3);
        ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, "Weapons List", "{FFFFFF}Pistols\n{FFFFFF}Sub-       Machine Guns\n{FFFFFF}Shotguns\n{FFFFFF}Assault Rifles\n{FFFFFF}Melee Weapons", "Select", "Cancel");
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)