11.11.2016, 17:52
So this the cmd to give a player money, any cmd that involves giving money has thing problem, though not all cmds.
in console:
Seems like a problem with zcmd's shit, but then again all other cmds work
PHP код:
CMD:givemoney(playerid, params[])
{
if (!AdminCheck(playerid, 4)) return 0;
new id, money, msg[128];
if (sscanf(params, "ii", id, money)) return SendClientMessage(playerid, ERRORCOLOR, "Usage: /givemoney [playerid] [amount]");
if (!IsPlayerConnected(id)) return SendClientMessage(playerid, ERRORCOLOR, "Invalid playerid.");
if (money < 1 || money > 100000000) return SendClientMessage(playerid, ERRORCOLOR, "Invalid amount. Amount must be between 1 and 100000000.");
GivePlayerMoney(id, money);
format(msg, sizeof(msg), "You have recieved $%d from an admin.", money);
SendClientMessage(id, 0xBB7DE7FF, msg);
format(msg, sizeof(msg), "Admin %s(ID:%d) has given $%d to %s(ID:%d).", Name[playerid], playerid, money, Name[id], id);
SendMessageToAdmins(1, msg);
strins(msg, "10", 0);
IRC_SendMessageToAdmins(2, msg);
return 1;
}
PHP код:
[debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[debug] Stack pointer (STK) is 0xFE0AD8, heap pointer (HEA) is 0xFE0AA4
[debug] AMX backtrace:
[debug] #0 00051974 in ?? () from ffs.amx
[debug] #1 00051a3c in ?? () from ffs.amx
[debug] #2 00051a3c in ?? () from ffs.amx
[debug] #3 00051a3c in ?? () from ffs.amx
[debug] #4 00051a3c in ?? () from ffs.amx
[debug] #5 00051a3c in ?? () from ffs.amx
..........................................................
[debug] #1237 00093988 in ?? () from ffs.amx
[debug] #1238 0003b224 in public cmd_setmoney () from ffs.amx
[debug] #1239 native CallLocalFunction () [004743b0] from samp-server.exe
[debug] #1240 00008164 in public OnPlayerCommandText () from ffs.amx