[ help ] dialog ( how to? ) - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [ help ] dialog ( how to? ) (
/showthread.php?tid=326663)
[ help ] dialog ( how to? ) -
RicaNiel - 18.03.2012
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);
}
}
Re: [ help ] dialog ( how to? ) -
Reklez - 18.03.2012
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