/setcash - failed [DCMD]
#1

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? >_<
Reply
#2

LoL

pawn Код:
GivePlayerMoney(playerid, cash);
Reply
#3

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
Reply
#4

No problem, sometimes and i make that n00b mistake
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)