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);
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);
}
if(invitee == INVALID_PLAYER_ID) return ShowPlayerDialog(playerid, DUELDIAG+1, DIALOG_STYLE_INPUT, "Select a player", "The player specified is not connected, try again....
if(pInVIP[invitee] == 1) return GameTextForPlayer(playerid,"~r~Command disabled at this moment",2000,3);
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");
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");
if(pInVIP[invitee] == 1) return GameTextForPlayer(playerid,"~r~Command disabled at this moment",2000,3);
SetPVarInt(playerid, "dPID", invitee);
ShowDuelSettingsDialog(playerid);
|
pawn Код:
NOTE: and BEFORE: if(invitee == INVALID_PLAYER_ID) to prevent index out of bounds runtime error. pawn Код:
|
if(pInVIP[invitee] == 1) return GameTextForPlayer(playerid,"~r~Command disabled at this moment",2000,3);
pInVIP[playerid] = 1;
CMD:vroom(playerid, params[])
{
if(pInfo[playerid][Donator] >= 1)
{
SetPlayerPos(playerid, -710.6376,1851.7188,8.7459);
SetPlayerFacingAngle(playerid, 270);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 20);
SetCameraBehindPlayer(playerid);
DestroyVehicle(GetPlayerVehicleID(playerid));
pInVIP[playerid] = 1;
SetPVarInt(playerid, "CMDDisabled", 1);
}
else return ShowPlayerDialog(playerid, DIALOG_NOVIP, DIALOG_STYLE_MSGBOX,"{09F7DF}NONE-VIP Member", "\n{ffd700}You must be at least VIP Level 1 (Bronze)", "Close", "");
}