13.05.2012, 16:55
I'm using this for my RolePlay server and how do I make the player to enter a valid year for his character between 15 and 100?
pawn Код:
if(dialogid == godine)
{
if(response == 0)
{
ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"{FF0000} GREЉKA","{FF0000}_______________________________\n\n Odustali ste od registracije pa\n\n ste izbaceni sa servera!\n\n_______________________________","Izadi","");
Kick(playerid); // kicks when player clicks cancel
return 1;
}
if(response == 1)
{
if(!strlen(inputtext))
{
ShowPlayerDialog(playerid,godine,DIALOG_STYLE_INPUT,"{FF0000} Godine","{FF0000}Unesite kolko godina ћelite da ima Vaљ lik:","U redu","Odustani");
SendClientMessage(playerid,CRVENA,"Godine ne smiju biti manje od 15 i vece od 100!");
// when nothing is entered the dialog shows again and sends a message
}
else
{
godinee(playerid,inputtext); // goes to stock which writes the years enterd in the player file
return 1;
}
}