new Float:DuelHealth;
new Float:DuelArmor;
if(dialogid == DIALOG_DUEL3)
{
if(response)
{
new Float:health = strlen(inputtext);
DuelHealth = health;
SendClientMessage(playerid, COLOR_WHITE, " ** You have set the Health ");
}
}
if(dialogid == DIALOG_DUEL3)
{
if(response)
{
new Float:armor= strlen(inputtext);
DuelHealth = armor;
SendClientMessage(playerid, COLOR_WHITE, " ** You have set the Armor");
}
}
public NewSettings
{
SetPlayerHealth(playerid, DuelHealth);
SetPlayerArmour(playerid, DuelArmor);
}
new Float:DuelHealth;
new Float:DuelArmor;
if(dialogid == DIALOG_DUEL3)
{
if(response)
{
new Float:health = strlen(inputtext);
DuelHealth = health;
NewSettings(playerid);
SendClientMessage(playerid, COLOR_WHITE, " ** You have set the Health ");
}
}
if(dialogid == DIALOG_DUEL3)
{
if(response)
{
new Float:armor= strlen(inputtext);
DuelHealth = armor;
NewSettings(playerid);
SendClientMessage(playerid, COLOR_WHITE, " ** You have set the Armor");
}
}
forward NewSettings(playerid);
public NewSettings(playerid)
{
SetPlayerHealth(playerid, DuelHealth);
SetPlayerArmour(playerid, DuelArmor);
}
new Float:health = strlen(inputtext); // ?
new Float:health = strval(inputtext); // the value of inputtext
Dialogs are not the Same ID, I just didn't change it when typing the code on here.
Anyways: new Float:health = strval(inputtext); DuelHealth = health; That gives me a Tag Mismatch error. On Like; DuelHealth = health; |
new Float:DuelHealth;
new Float:DuelArmor;
if(dialogid == DIALOG_DUEL3)
{
if(response)
{
DuelHealth = strval(inputtext);
SetPlayerHealth(playerid, DuelHealth);
SendClientMessage(playerid, COLOR_WHITE, " ** You have set the Health ");
}
}
if(dialogid == DIALOG_DUEL3)
{
if(response)
{
DuelArmor = strval(inputtext);
SetPlayerArmour(playerid, DuelArmor);
SendClientMessage(playerid, COLOR_WHITE, " ** You have set the Armor");
}
}