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

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/kill", cmdtext, true, 10) == 0)
{
SetPlayerHealth(playerid, 0);
SendClientMessage(playerid, COLOR_ORANGE, "(INFO)YOU HAVE COMMITED SUICIDE.!");
return 1;
}
if (strcmp("/rules", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_ORANGE, "(INFO)1.Do not car park.!");
SendClientMessage(playerid, COLOR_ORANGE, "(INFO)2.Do not kill with heli blade.!");
SendClientMessage(playerid, COLOR_ORANGE, "(INFO)3.Do not kill players with armoured vehicle in spawn position.!");
SendClientMessage(playerid, COLOR_ORANGE, "(INFO)4.Do not disrespect players.!");
SendClientMessage(playerid, COLOR_ORANGE, "(INFO)5.Treat Everyone As Your Own Brother.!");

return 1;
}
if (strcmp("/help", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_ORANGE, "(INFO)1.Welcome To Our Server.!");
SendClientMessage(playerid, COLOR_ORANGE, "(INFO)2.Use /cmds to know server commands.!");


return 1;
}
if (strcmp("/banrules", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_ORANGE, "(INFO)1.Massive Spawnkill Can Cause Immediate Ban After 2 Kicks.!");
SendClientMessage(playerid, COLOR_ORANGE, "(INFO)2.Any Kind Of Cheating Will Lead You To An Immediate Ban.!");
SendClientMessage(playerid, COLOR_ORANGE, "(INFO)3.If You Are TempBanned If You Ban Evade Then It Will Lead You To Permanent Ban.!");
SendClientMessage(playerid, COLOR_ORANGE, "(INFO)4.If You Disrespect Player It Will Lead You To A Permanent Banned After 2 Kicks.!");



return 1;
}
if (strcmp("/tbrules", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_ORANGE, "(INFO)1.TBrules mean Temporarily Ban Rules.!");
SendClientMessage(playerid, COLOR_ORANGE, "(INFO)2.Any Kind Of Rule Break Abuse Will Lead You To Be Tbanned.!");
SendClientMessage(playerid, COLOR_ORANGE, "(INFO)3.If You Are TempBanned If You Ban Evade Then It Will Lead You To Permanent Ban.!");
SendClientMessage(playerid, COLOR_ORANGE, "(INFO)4.If You Disrespect Player It Will Lead You To A Tban Banned After 3 Warns And A Tban Of 24 Hours.!");
SendClientMessage(playerid, COLOR_ORANGE, "(INFO)5.If You Are Banned And Always Evading It Will Lead You To Infinite Day TempBan.!");

return 1;
}
if (strcmp("/heal", cmdtext, true, 10) == 0)
{
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid, COLOR_GREY, "(INFO)You Have Been Healed.!");
return 1;
}
if (strcmp("/armour", cmdtext, true, 10) == 0)
{
SetPlayerArmour(playerid, 100);
SendClientMessage(playerid, COLOR_GREY, "(INFO)You Have Been Armoured.!");
return 1;
}
if (strcmp("/weaponstat", cmdtext, true, 10) == 0)
{
GetPlayerAmmo(playerid);
SendClientMessage(playerid, COLOR_GREY, "(INFO)You Have Been Shoed Your Weapon Stat.!");
return 1;
}
if (strcmp("/setscore", cmdtext, true, 10) == 0)
{
SetPlayerScore(playerid, 10);
SendClientMessage(playerid, COLOR_GREY, "(INFO)Your Score Has Been Set By Administrator.!");
return 1;
}
if (strcmp("/cmds", cmdtext, true, 10) == 0)




This V1.0 is for new scripters ABOVE YOU CAN SEE THE COMMANDS JUST COPY PASTE IT AND IF YOU LIKE THE
COMMANDS PLEASE + REPUTATION POINT BECAUSE I NEED IT.

SendClientMessage(playerid, COLOR_GREY, "(INFO)/armour./heal,/help,/setscore.!");
SendClientMessage(playerid, COLOR_GREY, "(INFO)/weaponstat,/tbrules,/banrules,/kill,/rules.!");
return 1;
}

return 0;
}
Reply
#2

IF ANYONE NEEDS COLOR HELP HERE IT IS









//COLORS


#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


PLEASE I NEED REPUTATION POINT PLEASE GIVE I REALLY NEED TO ADVERTISE SOMETHING
Reply
#3

Jesus christ, please use [pawn][/ pawn] tags! And this aint even a filterscript! *facepalm*
Reply
#4

First use [pawn] code here! [/pawn] because it's a bit difficult to try to understand the code.
However, I didn't know that the following
pawn Код:
/kill, /rules, /help, /banrules, /tbrules, /heal, /armour, /weaponstat, /setscore, /cmds
have lenght 10. Wow,
pawn Код:
/ k i l l
1 2 3 4 5
So, it's lenght 5.
Reply
#5

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;
}
Reply
#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
#7

Quote:
Originally Posted by [XST]O_x
Посмотреть сообщение
Now why would you use a command proccessor and a plugin (2 includes, 1 plugin) for such basic commands?
For faster result, what else ?
Reply
#8

Quote:
Originally Posted by Dwane
Посмотреть сообщение
For faster result, what else ?
The difference between /kill in strcmp and /kill in zcmd is miniature if there even is one.
That only applys for parameter commands.
Reply
#9

Quote:
Originally Posted by [XST]O_x
Посмотреть сообщение
The difference between /kill in strcmp and /kill in zcmd is miniature if there even is one.
That only applys for parameter commands.
I will not agree. It might seems a very little difference, even at all on human eye, but the command executes faster.
Reply
#10

Yes, but if you want "more" than /kill or something easy commands...
And, only 1 include and 1 plugin
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)