CMD:givemoney(playerid, params[])
{
new targetid, ammount;
if(sscanf(params, "ui",targetid)) return SendClientMessage(playerid, 0xFFFFFFF, "USAGE: /givemoney [PlayerID] [Ammount]");
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, red, "Error: This CMD is only for Admins!");
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, red, "Error: This Player isnt Connected!");
GivePlayerMoney(targetid,ammount);
return 1;
}
sscanf(params, "ui",targetid,ammount)
sscanf(params, "ui",targetid)
CMD:givemoney(playerid, params[])
{
if (PlayerInfo[playerid][pAdmin] >= 4)
{
new string[128], giveplayerid, money;
if(sscanf(params, "ud", giveplayerid, money)) return SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /givemoney [player] [money]");
if(IsPlayerConnected(giveplayerid))
{
GivePlayerCash(giveplayerid, money);
format(string, sizeof(string), "You have given %s $%d !",GetPlayerNameEx(giveplayerid),money);
SendClientMessageEx(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "%s has given %s $%d (/givemoney)", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid),money);
Log("logs/stats.log", string);
}
}
else
{
SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command.");
}
return 1;
}
^^^^^ He Fixed It Now For The Whole Command
PHP код:
|
^^^^^ He Fixed It Now For The Whole Command
PHP код:
|
Originally Posted by ******
Код:
Format Use L(true/false) Optional logical truthity l Logical truthity K<callback>(default text) Optional custom operator k<callback> Custom operator B(binary) Optional binary number b Binary number N(any format number) Optional number n Number C(character) Optional character c Character I(integer) Optional integer i Integer D(integer) Optional integer d Integer H(hex value) Optional hex number h Hex number O(octal value) Optional octal value o Octal value F(float) Optional floating point number f Floating point number G(float/INFINITY/-INFINITY/NAN/NAN_E) Optional float with IEEE definitions g Float with IEEE definitions { Open quiet section } Close quiet section P<delimiter> Invalid delimiter change p<delimiter> Delimiter change Z(string)[length] Invalid optional string z(string)[length] Deprecated optional string S(string)[length] Optional string s[length] String U(name/id) Optional user (bot/player) u User (bot/player) Q(name/id) Optional bot (bot) q Bot (bot) R(name/id) Optional player (player) r Player (player) A<type>(default)[length] Optional array of given type a<type>[length] Array of given type E<specification>(default) Optional enumeration of given layout e<specification> Enumeration of given layout 'string' Search string % Deprecated optional specifier prefix |