You can help fix that allow the introduction of not only the opponent's ideas, but also for Price
Code:
dcmd_duel(playerid, params[])
{
new tmp[256], tmp2[256], idx;
tmp = strtok(params, idx);
IDSended = playerid;
IDInvited = strval(tmp);
DuelPrice = strval(tmp2);
if(!strlen(tmp))
{
SendClientMessage(IDSended, RED, "-Wrong Command- {FFFFFF}USE: /duel [id]");
}else if(InDuel[IDSended]==1){
SendClientMessage(IDSended, RED, "-Error- {FFFFFF}You're in a duel.");
}else if(InDuel[IDInvited]==1){
SendClientMessage(IDSended, RED, "-Error- {FFFFFF}The other person is in a duel.");
}else if(!IsPlayerConnected(IDInvited)){
SendClientMessage(IDSended, RED, "-Error- {FFFFFF}This player is not connected.");
}else if(IDInvited == playerid)
{
SendClientMessage(IDSended, RED, "-Error- {FFFFFF}You can not duel with himself.");
}else{
if(!strlen(tmp2))
{
}else if(GetPlayerMoney(playerid) < DuelPrice || 0 >= DuelPrice)
{
SendClientMessage(IDSended, RED, "-Error-");
}else{
new StringInv[512], Name[64];
GetPlayerName(IDSended, Name, 64);
format(StringInv, sizeof(StringInv), "%s is calling you to a challenge. %d", Name, DuelPrice);
ShowPlayerDialog(IDInvited, DIALOG_INVITE, DIALOG_STYLE_MSGBOX, "Called the challenge", StringInv, "Accept", "Cancel");
}
}
return 1;
}