13.07.2010, 20:52
Should fix it...
pawn Код:
CMD:givemoney(playerid,params[])
{
if(IsPlayerConnected(playerid))
{
new playa,money,string[64],sendername[MAX_PLAYER_NAME],giveplayer[MAX_PLAYER_NAME],tmp[256];
if(PlayerInfo[playerid][pAdmin] >= 1338)
{
money = strval(tmp);
if(sscanf(params, "ui", playa,money)) return SendClientMessage(playerid,COLOR_GREY,"Lietojums: /givemoney <Spe-le-ta-ja ID> <Naudas Daudzums>");
if(IsPlayerConnected(playa))
{
PlayerInfo[playa][pMoneyH] += money;
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, 256, "AdmWarning: Administrators %s iedeva %s $%d.", sendername,giveplayer,money);
ABroadCast(COLOR_YELLOW,string,1);
}
else return SendClientMessage(playerid,COLOR_GREY,"Nepareizs spe-le-ta-ja ID");
}
else return SendClientMessage(playerid,COLOR_GREY,"Tu nevari izmantot љo komandu!");
}
return 1;
}