Dumb problem I think :P please help
#1

Hey guys. I just made a setcash command with dcmd>
What is wrong?:P
It always set the money to 0 :P

pawn Код:
dcmd_setcash(playerid,params[])
{
new string[286];
new target;
target = strval(params);
new amount;
if(adminlevel[playerid]<2)
{
SendClientMessage(playerid,COLOR_GREY,"You're not allowed to use this command");
return 1;
}
if(sscanf(params,"ud",playerid,amount))
{
SendClientMessage(playerid,COLOR_RED,"*Wrong format*");
SendClientMessage(playerid,COLOR_GREY,"HINT: Type /setcash [playerid] [amount]");
return 1;
}

SetPlayerMoney(target,amount);
format(string,sizeof(string),"*You've set %s's money to $%d*",playername[target],amount);
SendClientMessage(playerid,COLOR_RED,string);
format(string,sizeof(string),"*Your money has been set to $%d by admin %s*",amount,playername[playerid]);
SendClientMessage(target,COLOR_RED,string);
return 1;
}
Probaly a dumb mistake? :P
Thankya
Reply


Messages In This Thread
Dumb problem I think :P please help - by bartje01 - 21.07.2010, 20:00
Re: Dumb problem I think :P please help - by willsuckformoney - 21.07.2010, 20:04
Re: Dumb problem I think :P please help - by bartje01 - 21.07.2010, 20:09
Re: Dumb problem I think :P please help - by MadeMan - 21.07.2010, 20:31
Re: Dumb problem I think :P please help - by bartje01 - 21.07.2010, 20:50
Re: Dumb problem I think :P please help - by [L3th4l] - 21.07.2010, 20:57
Re: Dumb problem I think :P please help - by bartje01 - 21.07.2010, 21:00
Re: Dumb problem I think :P please help - by [L3th4l] - 21.07.2010, 21:00
Re: Dumb problem I think :P please help - by bartje01 - 21.07.2010, 21:23
Re: Dumb problem I think :P please help - by [L3th4l] - 21.07.2010, 21:35

Forum Jump:


Users browsing this thread: 1 Guest(s)