/setcash - failed [DCMD] - 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: /setcash - failed [DCMD] (
/showthread.php?tid=254327)
/setcash - failed [DCMD] -
jonnyboy - 10.05.2011
im trying to make an /setcash via dcmd but i only fail
here is the code:
pawn Код:
dcmd_setcash(playerid, params[])
{
new pID, cash;
if(PlayerInfo[playerid][AdminLevel] > 3)
{
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);
return SetPlayerMoney(pID,cash);
}
else if(PlayerInfo[playerid][AdminLevel] == 0) return SendClientMessage(playerid, COLOR_RED, "You must be administrator level 3 to use that command!");
return 1;
}
and here is the error:
Код:
D:\Rockstar Games\SAMP SERVER\gamemodes\gm.pwn(828) : warning 209: function "SetPlayerMoney" should return a value
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Warning.
how should i make the SetPlayerMoney? >_<
Re: /setcash - failed [DCMD] -
black_dota - 10.05.2011
LoL
pawn Код:
GivePlayerMoney(playerid, cash);
Re: /setcash - failed [DCMD] -
jonnyboy - 10.05.2011
Quote:
Originally Posted by black_dota
LoL
pawn Код:
GivePlayerMoney(playerid, cash);
|
thx lol
im just a noob at dcmd. trying so hard to understand dcmd xd
Re: /setcash - failed [DCMD] -
black_dota - 10.05.2011
No problem, sometimes and i make that n00b mistake