E:\Freeroam World\filterscripts\admin.pwn(650) : error 017: undefined symbol "IsNumeric" E:\Freeroam World\filterscripts\admin.pwn(650) : error 036: empty statement Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors.
dcmd_setcash(playerid,params[])
{
new Index;
new tmp[256]; tmp = strtok(params,Index);
new tmp2[256]; tmp2 = strtok(params,Index);
new id,n[MAX_PLAYER_NAME];
new Money = strval(tmp2);
new str[50];
if(!strlen(tmp) || !strlen(tmp2) || !IsNumeric(tmp2));
if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,ORANGE,"You need to be level 3 to use this command!");
if(!strlen(params)) return SendClientMessage(playerid,GREY,"USAGE: /Setcash <ID> <Amount> ");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,GREY,"Invalid ID");
ResetPlayerMoney(id);
GivePlayerMoney(id, Money);
format(str,sizeof(str),"Admin: %s has set your cash to $%d",n, Money);
SendClientMessage(id,GREEN,str);
return 1;
}
IsNumeric(const string[])
{
for (new i = 0, j = strlen(string); i < j; i++) {
if (string[i] > '9' || string[i] < '0') return 0;
}
return 1;
}
// At The Bottom
IsNumeric(const string[])
{
for (new i = 0, j = strlen(string); i < j; i++)
{
if (string[i] > '9' || string[i] < '0') return 0;
}
return 1;
}
if(!strlen(tmp) || !strlen(tmp2) || !IsNumeric(tmp2)) return 1;
dcmd_setcash(playerid, params[])
{
new pID, cash;
if(IsPlayerAdmin(playerid))
{
if(sscanf(params, "ud", pID, cash)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /setcash [playerid] [amount of money]");
if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_RED, "This player is not connected");
ResetPlayerMoney(pID);
GivePlayerMoney(pID,cash);
}
else
{
SendClientMessage(playerid, COLOR_RED, "You must be administrator to use that command!");
}
}
Most Probably copied from the LuxAdmin ^^
Well don't take it as an offense, just kidding. I recommend you to use sscanf and Zcmd and ZCMD is the most fastest command processor in SAMP and sscanf is better and more efficient then other things. pawn Код:
-FalconX |
I Wasn't Know How To Use This tmp2 and i copied it......
but any way the sscanf is really easy i learned it now by this cmd and it's working fine thnx i am going to convert the all cmds to sccanf ![]() |
if(gun < 47) return SendClientMessage(playerid,GREY,"Wrong Weapon ID You Can Get The Weapons IDS From Samp Wiki");
if(gun < 1 || gun > 47) return SendClientMessage(playerid,GREY,"Wrong Weapon ID You Can Get The Weapons IDS From Samp Wiki");