if(dialogid == 46)
{
if(response)
{
new string[256];
if(!strval(inputtext))
{
SendClientMessage(playerid,-1,"{FF0000}[HATA]: {FFFFFF}Lьtfen numara giriniz.");
ShowPlayerDialog(playerid,46,DIALOG_STYLE_INPUT,"{FFAAEE}[T-RPG] - {FF0000}Banka Sistemi","Gцrьnьşe gцre ilk kez bankamıza geldiniz, lьtfen bir PIN kaydediniz.","Tamam","İptal");
}
if(strval(inputtext) == 0)
{
SendClientMessage(playerid,-1,"{FF0000}[HATA]: {FFFFFF}Yanlış bir değer girdiniz.");
SendClientMessage(playerid,-1,"{FF0000}(( {00FF00}[BİLGİLENDİRME]: {FFFFFF}Şifre harfden oluşamaz. Lьtfen RAKAM giriniz. {FF0000}))");
}
if(strlen(inputtext) >= 5 || strlen(inputtext) == 0)
{
SendClientMessage(playerid,-1,"{FF0000}[HATA]: {FFFFFF}Şifreniz en az 1, en зok 4 numara olabilir.");
ShowPlayerDialog(playerid,46,DIALOG_STYLE_INPUT,"{FFAAEE}[T-RPG] - {FF0000}Banka Sistemi","Gцrьnьşe gцre ilk kez bankamıza geldiniz, lьtfen bir PIN kaydediniz.","Tamam","İptal");
}
else
{
new sifre = strval(inputtext);
PlayerInfo[playerid][pBanka] = 1;
PlayerInfo[playerid][pPIN] = sifre;
format(string,sizeof(string),"{00FF00}[BİLGİLENDİRME]: {FFFFFF}Şifreniz başarıyla %i yapılmıştır.",sifre);
SendClientMessage(playerid,-1,string);
ShowPlayerDialog(playerid,45,DIALOG_STYLE_INPUT,"{FFAAEE}[T-RPG] - {FF0000}Banka Sistemi","Lьtfen alttaki kutucuğa kaydettiğiniz banka şifresini giriniz.","Tamam","İptal");
}
}
}
Haven't worked with those stuff for a long time, but I think the functions IsNumeric works fine (https://sampwiki.blast.hk/wiki/Useful_Functions#IsNumeric) That will check if the player typed numbers.
|