31.10.2013, 19:45
Duel invite player
I Added
FINAL
So after a player went to a vip room and I tried to invite him in a duel it still allow him to invite to duel. It should be not. It should say "Command disabled at this moment"
Код:
if(dialogid == DUELDIAG+1)
{
if(response)
{
new invitee;
if(sscanf(inputtext, "u", invitee)) return ShowPlayerDialog(playerid, DUELDIAG+1, DIALOG_STYLE_INPUT, "{09F7DF}Select a player", "{FFFFFF}Type in the name/playerid of the player you want\nto invite to a duel \n\n{ffd700}Note: You can enter partial names", "Continue", "Back");
if(invitee == INVALID_PLAYER_ID) return ShowPlayerDialog(playerid, DUELDIAG+1, DIALOG_STYLE_INPUT, "{09F7DF}Select a player", "{FF0000}The player specified is not connected, try again\n\n{FFFFFF}Type in the name/playerid of the player you want\nto invite to a duel \n\n{ffd700}Note: You can enter partial names", "Continue", "Back");
SetPVarInt(playerid, "dPID", invitee);
ShowDuelSettingsDialog(playerid);
}
else ShowDuelSettingsDialog(playerid);
}
Код:
if(pInVIP[invitee] == 1) return GameTextForPlayer(playerid,"~r~Command disabled at this moment",2000,3);
So after a player went to a vip room and I tried to invite him in a duel it still allow him to invite to duel. It should be not. It should say "Command disabled at this moment"
Код:
if(dialogid == DUELDIAG+1)
{
if(response)
{
new invitee;
if(pInVIP[invitee] == 1) return GameTextForPlayer(playerid,"~r~Command disabled at this moment",2000,3);
if(sscanf(inputtext, "u", invitee)) return ShowPlayerDialog(playerid, DUELDIAG+1, DIALOG_STYLE_INPUT, "{09F7DF}Select a player", "{FFFFFF}Type in the name/playerid of the player you want\nto invite to a duel \n\n{ffd700}Note: You can enter partial names", "Continue", "Back");
if(invitee == INVALID_PLAYER_ID) return ShowPlayerDialog(playerid, DUELDIAG+1, DIALOG_STYLE_INPUT, "{09F7DF}Select a player", "{FF0000}The player specified is not connected, try again\n\n{FFFFFF}Type in the name/playerid of the player you want\nto invite to a duel \n\n{ffd700}Note: You can enter partial names", "Continue", "Back");
SetPVarInt(playerid, "dPID", invitee);
ShowDuelSettingsDialog(playerid);
}
else ShowDuelSettingsDialog(playerid);
}


