COMMAND:givemoney(playerid, params[])
{
if (IsPlayerAdmin(playerid))
{
new
toplayerid, // the player we want to give money to
amount;
// extracting player's ID and amount from params
if (!sscanf(params, "ii", toplayerid, amount))
{
if (toplayerid != INVALID_PLAYER_ID)
{
new
message[40];
GivePlayerMoney(toplayerid, amount);
format(message, sizeof(message), "You got $%d from admin!", amount);
SendClientMessage(toplayerid, 0x00FF00FF, message);
}
else SendClientMessage(playerid, 0xFF0000FF, "That player is not connected");
}
else SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /givemoney <playerid> <amount>");
}
else SendClientMessage(playerid, 0xFF0000FF, "Only admins can use this command!");
return 1;
}
C:\Slymind-Projects\gamemodes\slymind.pwn(437) : warning 203: symbol is never used: "givemoney" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Warning.
#include <a_samp> // must be first
#include <zcmd>
|
Include ZCMD.
pawn Код:
|
C:\Slymind-Projects\gamemodes\slymind.pwn(3) : fatal error 100: cannot read from file: "zcmd" Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
|
Download zcmd.inc and paste it to C:\Slymind-Projects\pawno\include folder.
http://www.solidfiles.com/d/323cc04b3c/zcmd.inc |