/sendmoney:
PHP код:
CMD:sendmoney(playerid, params[])
{
new giveplayerid, amount, Message[128], pName[MAX_PLAYER_NAME],pName1[MAX_PLAYER_NAME],Message1[128];
if (sscanf(params, "ud", giveplayerid, amount)) SendClientMessage(playerid, 0xf8f8f8ff, "Syntax: {f00f00}/sendmoney [playerid/partname] [amount]");
else if (!IsPlayerConnected(giveplayerid)) SendClientMessage(playerid, 0xf8f8f8fff, "ERROR: {FFFFFF}Player isn't connected!");
else if (giveplayerid == playerid) SendClientMessage(playerid, 0xf8f8f8fff, "ERROR: {F00f00}You cannot send money to yourself!");
else if (amount > GetPlayerMoney(playerid)) SendClientMessage(playerid, 0xf8f8f8fff, "ERROR: {Ffffff}You Don't have that much!");
else if (amount < 0) SendClientMessage(playerid, 0xf8f8f8fff,"ERROR: {f00f00}Wrong Value!");
else
{
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
GetPlayerName(giveplayerid,pName1,MAX_PLAYER_NAME);
GivePlayerMoney(giveplayerid, amount);
GivePlayerMoney(playerid, -amount);
format(Message, sizeof(Message), "You have Received $%d From {f00f00}%s(%d)!",amount, pName, playerid);
SendClientMessage(giveplayerid,-1, Message);
GameTextForPlayer(giveplayerid, "~W~! ~Y~RECEIVED ~G~CASH ~W~!", 3000,3);
format(Message1, sizeof(Message1), "Successfully sent $%d to {f00f00}%s(%d)!",amount, pName1, giveplayerid);
SendClientMessage(playerid,-1, Message1);
GameTextForPlayer(playerid, "~W~! ~G~CASH ~y~SENT ~W~!", 3000,3);
}
return 1;
}
/god:
PHP код:
new God[MAX_PLAYERS];
CMD:god(playerid, params[])
{
if (God[playerid] == 1)
{
SendClientMessage(playerid, COLOR_RED, ".:. {e6e600}You have disabled god mode.");
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
God[playerid] = 0;
return 1;
}
else if(God[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREEN, ".:. {ff3399}You have enabled god mode.");
God[playerid] = 1;
SetPlayerArmour(playerid, 9999999);
SetPlayerHealth(playerid, 9999999);
return 1;
}
return 1;
}
/heal:
PHP код:
CMD:heal(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
new targetid, string[100];
if(sscanf(params, "i", targetid)) return SendClientMessage(playerid, 0xF8F8F8FFF, "[SYNTAX]: {FFFFFF}/heal {FF0000}[PlayerID]");
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, 0xF8F8F8FFF, "[ERROR]: {FFFFFF}This player is {FF0000}NOT {FFFFFF}connected!");
SetPlayerHealth(targetid, 100.0);
format(string, sizeof(string), "* {FFFFFF}Administrator {FFD700}%s(ID:%d) {FFFFFF}has Healed {FFD700}%s(ID:%d){FFFFFF}!", GetName(playerid), playerid, GetName(targetid), targetid);
SendClientMessageToAll(0xF8F8F8FFF, string);
}
else
{
SendClientMessage(playerid, 0xF8F8F8Fff, "* {FFFFFF}You Have to be {FFD700}Admin Level 1{FFFFFF} at-least to use this command!");
}
return 1;
}
/kill:
PHP код:
CMD:kill(playerid,params[])
{
new string[128]; new name[MAX_PLAYER_NAME];
SetPlayerHealth(playerid,0.0);
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
format(string, sizeof(string), "{00ffff}: {F00f00}%s Has Dead. (/kill)", name);
SendClientMessageToAll(0xF8F8F8FFF, string);
return 1;
}