#include <a_samp> #include <zcmd> //Color Defines #define COLOR_GREEN 0x008000FF #define COLOR_BLUE 0x0000FFFF #define COLOR_BRIGHTRED 0xFF000AAA #define COLOR_AQUA 0x00FFFFAA #define COLOR_GREY 0xAFAFAFAA #define COLOR_BEIGE 0xFFF8DCAA #define COLOR_BLACK 0x000000AA #define COLOR_LIGHTERBLUE 0x00BFFFAA #define COLOR_BLUELIGHT 0x1E90FFAA #define COLOR_BLUEMEDIUM 0x0000CDAA #define COLOR_BLUEDARK 0x00008BAA #define COLOR_PINK 0xFF1493AA #define COLOR_PINKDARK 0xFF00FFAA #define COLOR_GREENLIGHT 0x00FF00AA #define COLOR_GREENDARK 0x006400AA #define COLOR_MAROON 0x800000AA #define COLOR_OKER 0x808000AA #define COLOR_ORANGE 0xFF4500AA #define COLOR_ORANGELIGHT 0xFF8C00AA #define COLOR_PURPLE 0x800080AA #define COLOR_VIOLETDARK 0x9400D3AA #define COLOR_INDIGO 0xAB0082AA #define COLOR_RED 0xFF0000AA #define COLOR_SAND 0xFFDEADAA #define COLOR_SILVER 0xC0C0C0AA #define COLOR_TEAL 0x008080AA #define COLOR_WHITE 0xFFFFFFAA #define COLOR_YELLOW 0xFFFF00AA #define COLOR_GOLD 0xFFD700AA #define COLOR_BROWN 0x8B4513AA #define COLOR_BROWNLIGHT 0xA0522DAA #define COLOR_GRAY 0xA9A9A9AA #define COLOR_GRAYDARK 0x696969AA #define COLOR_INVISIBLE 0xFFFFFF00 //Color Defines
CMD:healme(playerid,params[]) { //This wil open the command SendClientMessage(playerid,COLOR_RED,"You have healed yourself"); //This will send you a message saying "You have healed yourself. SetPlayerHealth(playerid,100); //"100" Is the ammount of HP it will add to the user who makes /healme, you can edit it. return 1; //This will let the server know the CMD was done successfully. } //This will close the command, as it was successfully processed.
CMD:armourme(playerid,params[]) { //This wil open the command SendClientMessage(playerid,COLOR_RED,"You have refilled your armour"); //This will send you a message saying "You have refilled your armour. SetPlayerArmour(playerid,100); //"100" Is the ammount of armour it will setto the user who makes /armourme, you can edit it. return 1; //This will let the server know the CMD was done successfully. } //This will close the command, as it was successfully processed.
CMD:weaponset(playerid,params[]) { //This wil open the command SendClientMessage(playerid,COLOR_RED,"You have spawned a weapon set"); //It will send a message saying that you have spawned a weapon set to you. GivePlayerWeapon(playerid,24,9999); // 24 = The id of the weapon, in this case a Deagle and "9999" is the ammount of ammo. GivePlayerWeapon(playerid,31,9999); //31 = The id of the weapon, in this case a M4 and "9999" is the ammount of ammo. return 1; //This will let the server know the CMD was done successfully. } //This will close the command, as it was successfully processed.
GivePlayerMoney(playerid,#); =In # you must add the ammount, you can allso add negative ammount, wich can be made placing a "-" Before the number SendClientMessageToAll(playerid,%,"#"); % = The color, you might be using the colors you defined at the top. # is the textit will send! Allways make sure the text is between two Of these ", Example:"HELLO! "
I know you said basic, but a lot of people know how to create all this stuff. They just don't understand the ZCMD syntax, which is why you should create something a bit more advanced like a /healperson [playerid] [health] or something like that.
|
Code:
#include <a_samp> #include zcmd |
#include <zcmd>
#include zcmd