Givecash command problem - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Givecash command problem (
/showthread.php?tid=269851)
Givecash command problem -
CoNvErTeR - 18.07.2011
ok i am using zcmd,
Here is Command
Код:
CMD:agivecash(playerid, params[]) {
if(playerVariables[playerid][pAdminLevel] >= 4) {
new id,name[24],amount,str[130];
if(sscanf(params, "ud", id,amount)) return SendClientMessage(playerid,COLOR_RED, "/Agivecash [playerid/name] [amount]";
GetPlayerName(id,name,24);
format(str,130,"You Given %s (%d) $%d!",name,id,amount);
SendClientMessage(playerid,COLOR_RED,str);
format(str,130,"Admin Given You $%d",amount);
SendClientMessage(id,COLOR_RED,str);
GivePlayerMoney(id,amount);
}else return SendClientMessage(playerid,red,"You Are Not An Admin, You Cant Use This Command");
return 1;
}
And Here Are Errors
Код:
C:\Documents and Settings\Matej & Mario\Desktop\Nova mapa (2)\Windows\gamemodes\vx-rp.pwn(7993) : error 001: expected token: ",", but found ";"
C:\Documents and Settings\Matej & Mario\Desktop\Nova mapa (2)\Windows\gamemodes\vx-rp.pwn(8001) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Help?
Re: Givecash command problem -
Wesley221 - 18.07.2011
pawn Код:
if(sscanf(params, "ud", id,amount)) return SendClientMessage(playerid,COLOR_RED, "/Agivecash [playerid/name] [amount]");
Re: Givecash command problem -
Bakr - 18.07.2011
You are missing a ) on this line:
pawn Код:
if(sscanf(params, "ud", id,amount)) return SendClientMessage(playerid,COLOR_RED, "/Agivecash [playerid/name] [amount]";
Also, loose indention means the vertical lining (indention) of the code is off.
Re: Givecash command problem -
CoNvErTeR - 18.07.2011
Thanks, it work now.