10.05.2011, 12:53
im trying to make an /setcash via dcmd but i only fail 
here is the code:
and here is the error:
how should i make the SetPlayerMoney? >_<

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;
}
Код:
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.