16.11.2011, 18:51
Hi , I have some problems. I created an calculator script so I came to the root cmd. I created it but i don't know what's wrong with the code whatever the number I enter it always gives me the results like 10821082 and that stuff.
So can somebody make my code working?
So can somebody make my code working?
pawn Код:
YCMD:root(playerid,params[],help) {
#pragma unused help
new sq,Float:res,str[128];
if(sscanf(params, "i", sq)) return SendClientMessage(playerid,-1,"USAGE: /root [number]");
res = floatsqroot(sq);
format(str,sizeof str,"RESULT: %i",res);
SendClientMessage(playerid,-1,str); return true; }