[ help ] dialog ( how to? )
#1

Guys how to do this
Player can only enter number not letters
when they type a Letter it will say

[ Error ]: Please use a numeric not letter

bdw sorry for my english
here is my code

pawn Код:
case D_SKINSHOP:
        {
            if (!response) return SendClientMessage(playerid,C_ERROR,"[ Error ]:"CWHITE" You have cancelled it ");
            if(response)
            {
                new Skinid;
                Skinid = strlen(inputtext);
                if(pData[playerid][pCash] < 5000) return SendClientMessage(playerid,C_ERROR,"[ Error ]:"CWHITE" You dont have enough money to buy this skin");
                if(Skinid < 0 || Skinid > 299) return SendClientMessage(playerid,C_BOT,"Enricka:"CWHITE" Sorry That skin id is not available");
                GetMoney(playerid,5000);
                SetPlayerSkin(playerid,Skinid);
            }
        }
Reply
#2

use IsNumeric search around the forums. well i speak english bad too

after you find the IsNumeric function.

do this

pawn Код:
if(!IsNumeric(inputtext)) return //do what ever you want
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)