[FilterScript] Commands For New Players/Scripter V1.0
#6

Quote:
Originally Posted by lamarr007
Посмотреть сообщение
Heh, this "scripts" wonґt work
Try to do this in ZCMD or YCMD with sscanf.
Like that >
pawn Код:
#include <a_samp>
#include <zcmd>
#include <sscanf2>

#define COLOR_RED 0xFF000000
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_BRIGHTRED 0xFF0000AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_PINK 0xFF66FFAA
#define COLOR_BLUE 0x3A47DEFF
#define COLOR_TAN 0xBDB76BAA
#define COLOR_PURPLE 0x800080AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_INDIGO 0x4B00B0AA
#define COLOR_BLACK 0x00000000
#define COLOR_DARKGREY 0x696969FF

CMD:heal(playerid, params[])
{
    SetPlayerHealth(playerid, 100);
    SendClientMessage(playerid, COLOR_YELLOW, "You has been healed !");
    return 1;
}

CMD:armour(playerid, params[])
{
    SetPlayerArmour(playerid, 100);
    SendClientMessage(playerid, COLOR_GREY, "You has been armoured !");
    return 1;
}

CMD:rules(playerid, params[])
{
    return ShowPlayerDialog(playerid, 1111, DIALOG_STYLE_MSGBOX, "Rules :","Donґt cheating\nDonґt say Youґre admin\nDonґt spam","OK","");
}

CMD:cmds(playerid, params[])
{
    return ShowPlayerDialog(playerid, 1112, DIALOG_STYLE_MSGBOX, "Commands :","/heal, /armour, /rules\n/cmds","OK","");
}

CMD:kill(playerid, params[])
{
    return SetPlayerHealth(playerid, -10.0);
}

CMD:setscore(playerid, params[])
{
    new targetid, ammount;
    if(sscanf(params,"ui", targetid, ammount)) return SendClientMessage(playerid, COLOR_RED,"USE: /setscore [ID] [AMOUNT]");
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "Error: You arenґt admin!");
    if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_RED, "Error: This player isnґt online!");
    SetPlayerScore(targetid, ammount);
    return 1;
}
CMD:weaponstats(playerid, params[])
{
    new string[20],Float:ammo = GetPlayerAmmo(playerid);
    format(string, sizeof(string),"Weapon ammo : %i",ammo);
    SendClientMessage(playerid, COLOR_ORANGE, string);
    return 1;
}
Now why would you use a command proccessor and a plugin (2 includes, 1 plugin) for such basic commands?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)