else if( dialogid == DIALOG_DAJSVIMA_NOVAC )
{
if( !response ) return true;
if( response )
{
if((inputtext < 1) || (inputtext > 500000)) return SendClientMessage(playerid,0xFFFFFFFF,"Cifra ne sme biti manja od 5000$, ili vec od 500000$!");
{
kolicina = inputtext;
foreach( Player, i )
{
if( i != INVALID_PLAYER_ID && PlayerLogged[ i ] != false )
{
DajIgracuNovac( i, kolicina );
format( globalstring, sizeof( globalstring ), ""col_athlone"|:.Black Storm:.| "col_white" Vlasnik %s je nagradio sve igrace sa: %d$.", ImeIgraca( playerid ), kolicina );
SCMA( -1, globalstring );
}
}
}
}
}
error 033: array must be indexed (variable "inputtext") error 017: undefined symbol "kolicina" warning 215: expression has no effect error 017: undefined symbol "kolicina" error 017: undefined symbol "kolicina"
new string[4] = "250";
new iValue = strval(string); // iValue is now '250'
inputtext is a string. You need to turn it into an integer.
https://sampwiki.blast.hk/wiki/Strval Example: PHP код:
|
if(response)
{
new amount;
amount = strval(inputtext);
if(amount < 1 || amount > 2)
{
return;
}
}