19.08.2010, 22:22
I'm still new to zcmd as I've stated a few times today, so I don't know exactly how to fix this.
Код:
(596) : error 035: argument type mismatch (argument 2) (597) : error 006: must be assigned to an array
pawn Код:
CMD:setcash(playerid, params[])
{
if(AccountInfo[playerid][AdminLevel] < 1) return SendClientMessage(playerid, 0xFAFAFAFA, "You are not an admin!");
{
new str[256], str2[256], id, Name1[MAX_PLAYER_NAME], Name2[MAX_PLAYER_NAME];
if(sscanf(params, "us", id, str2))
{
SendClientMessage(playerid, 0xFF0000FF, "Usage: /setcash <id> <amount>");
return 1;
}
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Player not connected");
{
GetPlayerName(playerid, Name1, sizeof(Name1));
GetPlayerName(id, Name2, sizeof(Name2));
format(str, sizeof(str), "HellBot: %s has had their cash set by: %s! [Ammount: %s]",Name2,Name1,str2);
SendClientMessageToAll(WHITE, str);
printf("[ADMIN] Set Cash: %s Amount: %s",Name2,str2);
ResetPlayerMoney(id);
GivePlayerMoney(id, str2); // Line 596
AccountInfo[playerid][Cash] = str2; // Line 597
}
}
return 1;
}