I need help with command transfer. - 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: I need help with command transfer. (
/showthread.php?tid=250204)
I need help with command transfer. -
the_zande - 22.04.2011
Okay so how I can transfer this
pawn Код:
dcmd_deposit(playerid,params[])
{
new file[100],Name[MAX_PLAYER_NAME],Ip[16]; GetPlayerName(playerid,Name,sizeof(Name)); GetPlayerIp(playerid,Ip,sizeof(Ip)); format(file,sizeof(file),PlayerFile,Name);
new deposit;
if(!IsPlayerInRangeOfPoint(playerid,15.0, 2312.0933 ,-4.0435, 26.7422)) return SendClientMessage(playerid,Red,"ERROR : You Have To Be In The Bank");
else if(sscanf(paramas,"d",deposit)) return SendClientMessage(playerid,Red,"USAGE : /deposit [Amount]");
else if(deposit > GetPlayerMoney(playerid)) return SendClientMessage(playerid,Red,"ERROR : You Don't Have That Amount!");
else
{
GivePlayerMoney(playerid,-deposit);
Pinfo[playerid][Deposit] += deposit;
new string[128];
format(string,sizeof(string),"SERVER : You Have Deposited $%d",deposit);
SendClientMessage(playerid,Green,string);
dini_IntSet(file,"Deposit",Pinfo[playerid][Deposit]);
}
return 1;
}
to strcmp?
Re: I need help with command transfer. -
Stigg - 22.04.2011
Edit: Missunderstood. Sozz.
Re: I need help with command transfer. -
the_zande - 22.04.2011
it says:error 017: undefined symbol "paramas" on that line: else if(sscanf(paramas,"d",deposit)) return SendClientMessage(playerid,Red,"USAGE : /deposit [Amount]");
Re: I need help with command transfer. -
Vince - 22.04.2011
Because it's supposed to be
params and not
paramas. -.-
Re: I need help with command transfer. -
the_zande - 22.04.2011
it says it again but ofc unfinded params