#include <a_samp>
#include <sscanf2>
#include <zcmd>
COMMAND:help(playerid, params[]) //Command is: help
{
COMMAND:help(playerid, params[]) //Command is: help
{
#pragma unused params
//Tells the script that there is no text after the "/help" command, (IS OPTIONAL)
SendClientMessage(playerid, COLOR, "this is the text the player will see");
//Where "playerid" is the player who types "/help"
//"COLOR" is the color which you will need to define in the top of your script.
//"text"); is the text you want the player to see.
COMMAND:help(playerid, params[]) //Command is: help
{
#pragma unused params
//Tells the script that there is no text after the "/help" command
SendClientMessage(playerid, red, "_________________________Server Help_____________________________");
SendClientMessage(playerid, green, "[HELP] This is a BLANK server, Work with your team to");
SendClientMessage(playerid, green, "[HELP] destroy other teams and earn the highest score");
SendClientMessage(playerid, green, "[HELP] See /admins if you need any help");
SendClientMessage(playerid, green, "[HELP] For more information on the commands see: /cmds");
SendClientMessage(playerid, green, "[HELP] /rules - For server rules");
SendClientMessage(playerid, red, "_________________________________________________________________");
}
CMD:givemoney(playerid, params[])
{
CMD:
COMMAND:
CMD:givemoney(playerid, params[])
{
new giveplayerid, amount
CMD:givemoney(playerid, params[])
{
new giveplayerid, amount;
new string[128];
CMD:givemoney(playerid, params[])
{
new giveplayerid, amount;
new string[128];
if (sscanf(params, "ud", giveplayerid, amount)) return SendClientMessage(playerid, 0xFF0000AA, "Usage: /givecash [playerid/partname] [amount]");
CMD:givemoney(playerid, params[])
{
new giveplayerid, amount;
new string[128];
if (sscanf(params, "ud", giveplayerid, amount)) return SendClientMessage(playerid, 0xFF0000AA, "Usage: /givecash [playerid/partname] [amount]");
else if (giveplayerid == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found");
else if (amount > GetPlayerMoney(playerid)) SendClientMessage(playerid, 0xFF0000AA, "Insufficient Funds");
else if (giveplayerid == playerid) SendClientMessage(playerid, 0xFF0000AA, "You cannot send money to yourself");
else if (giveplayerid == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found");
else if (amount > GetPlayerMoney(playerid)) SendClientMessage(playerid, 0xFF0000AA, "Insufficient Funds"
else if (giveplayerid == playerid) SendClientMessage(playerid, 0xFF0000AA, "You cannot send money to yourself");
CMD:givemoney(playerid, params[])
{
new giveplayerid, amount;
new string[128];
if (sscanf(params, "ud", giveplayerid, amount)) return SendClientMessage(playerid, 0xFF0000AA, "Usage: /givecash [playerid/partname] [amount]");
else if (giveplayerid == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found");
else if (amount > GetPlayerMoney(playerid)) SendClientMessage(playerid, 0xFF0000AA, "Insufficient Funds");
else if (giveplayerid == playerid) SendClientMessage(playerid, 0xFF0000AA, "You cannot send money to yourself");
GivePlayerMoney(giveplayerid, amount);
GivePlayerMoney(playerid, -amount);
format(string, sizeof string, "[SERVER] %d amount of Money has been Sent to %s", amount, giveplayerid);
SendClientMessage(playerid, COLOR_RED, string);
format(string, sizeof string, "[SERVER] %d amount of Money has Sent by %s", amount, playerid);
SendClientMessage(giveplayerid, COLOR_RED, string);
return 1;
}
GivePlayerMoney(giveplayerid, amount);
GivePlayerMoney(playerid, -amount);
format(string, sizeof string, "[SERVER] %d amount of Money has been Sent to %s", amount, giveplayerid);
SendClientMessage(playerid, COLOR_RED, string);
format(string, sizeof string, "[SERVER] %d amount of Money has Sent by %s", amount, playerid);
SendClientMessage(giveplayerid, COLOR_RED, string);
return 1;
#pragma unused params
Nice but you said admin commands, I don't see you using any admin command, they are normal commands that anyone can use it, fix this topic please.
P.S: Good work. |