Код:
#include <a_samp>
#include <zcmd>
#define PRESSED(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
new Text:txta;
new Text:txtb;
new Text:txtc;
new Text:txtd;
new Text:txte;
new Text:txtf;
new Text:txtg;
new Text:txth;
new Text:txti;
new Text:txtj;
new Text:txtk;
new Text:txtl;
new Text:txtm;
public OnGameModeInit()
{
txta = TextDrawCreate(506.666687, 105.618507, "usebox");
TextDrawLetterSize(txta, 0.000000, 28.075101);
TextDrawTextSize(txta, 126.666641, 0.000000);
TextDrawAlignment(txta, 1);
TextDrawColor(txta, 0);
TextDrawUseBox(txta, true);
TextDrawBoxColor(txta, 102);
TextDrawSetShadow(txta, 0);
TextDrawSetOutline(txta, 0);
TextDrawFont(txta, 0);
txtb = TextDrawCreate(235.333160, 106.607345, "server Rules");
TextDrawLetterSize(txtb, 0.589666, 2.309334);
TextDrawAlignment(txtb, 1);
TextDrawColor(txtb, -16776961);
TextDrawSetShadow(txtb, 0);
TextDrawSetOutline(txtb, 1);
TextDrawBackgroundColor(txtb, 51);
TextDrawFont(txtb, 1);
TextDrawSetProportional(txtb, 1);
txtc = TextDrawCreate(232.666595, 146.844329, "Hack/Cheats/Mods is not allowed");
TextDrawLetterSize(txtc, 0.300000, 1.000000);
TextDrawAlignment(txtc, 1);
TextDrawColor(txtc, -1378294017);
TextDrawSetShadow(txtc, 0);
TextDrawSetOutline(txtc, 0);
TextDrawBackgroundColor(txtc, 51);
TextDrawFont(txtc, 1);
TextDrawSetProportional(txtc, 1);
txtd = TextDrawCreate(193.666595, 164.681396, "killing is not allowed(excpet on Dm stadium)");
TextDrawLetterSize(txtd, 0.300000, 1.000000);
TextDrawAlignment(txtd, 1);
TextDrawColor(txtd, -1378294017);
TextDrawSetShadow(txtd, 0);
TextDrawSetOutline(txtd, 0);
TextDrawBackgroundColor(txtd, 51);
TextDrawFont(txtd, 1);
TextDrawSetProportional(txtd, 1);
txte = TextDrawCreate(214.999908, 183.348236, "C-bug or any kind of bug is not allowed");
TextDrawLetterSize(txte, 0.300000, 1.000000);
TextDrawAlignment(txte, 1);
TextDrawColor(txte, -1378294017);
TextDrawSetShadow(txte, 0);
TextDrawSetOutline(txte, 0);
TextDrawBackgroundColor(txte, 51);
TextDrawFont(txte, 1);
TextDrawSetProportional(txte, 1);
txtf = TextDrawCreate(242.333312, 199.525955, "Score farming is not allowed");
TextDrawLetterSize(txtf, 0.300000, 1.000000);
TextDrawAlignment(txtf, 1);
TextDrawColor(txtf, -1378294017);
TextDrawSetShadow(txtf, 0);
TextDrawSetOutline(txtf, 0);
TextDrawBackgroundColor(txtf, 51);
TextDrawFont(txtf, 1);
TextDrawSetProportional(txtf, 1);
txtg = TextDrawCreate(188.333389, 215.702697, "Don't carjack any player");
TextDrawLetterSize(txtg, 0.300000, 1.000000);
TextDrawAlignment(txtg, 1);
TextDrawColor(txtg, -1378294017);
TextDrawSetShadow(txtg, 0);
TextDrawSetOutline(txtg, 0);
TextDrawBackgroundColor(txtg, 51);
TextDrawFont(txtg, 1);
TextDrawSetProportional(txtg, 1);
txth = TextDrawCreate(211.333374, 233.540725, "Don't AFK on spawnpoint");
TextDrawLetterSize(txth, 0.300000, 1.000000);
TextDrawAlignment(txth, 1);
TextDrawColor(txth, -1378294017);
TextDrawSetShadow(txth, 0);
TextDrawSetOutline(txth, 0);
TextDrawBackgroundColor(txth, 51);
TextDrawFont(txth, 1);
TextDrawSetProportional(txth, 1);
txti = TextDrawCreate(209.333435, 250.962921, "Do not use admin account and try to use it");
TextDrawLetterSize(txti, 0.300000, 1.000000);
TextDrawAlignment(txti, 1);
TextDrawColor(txti, -1378294017);
TextDrawSetShadow(txti, 0);
TextDrawSetOutline(txti, 0);
TextDrawBackgroundColor(txti, 51);
TextDrawFont(txti, 1);
TextDrawSetProportional(txti, 1);
txtj = TextDrawCreate(211.333419, 268.800140, "Do not ask to be admin we choose admins");
TextDrawLetterSize(txtj, 0.300000, 1.000000);
TextDrawAlignment(txtj, 1);
TextDrawColor(txtj, -1378294017);
TextDrawSetShadow(txtj, 0);
TextDrawSetOutline(txtj, 0);
TextDrawBackgroundColor(txtj, 51);
TextDrawFont(txtj, 1);
TextDrawSetProportional(txtj, 1);
txtk = TextDrawCreate(235.999893, 287.466888, "No insulting, flaming the admins");
TextDrawLetterSize(txtk, 0.300000, 1.000000);
TextDrawAlignment(txtk, 1);
TextDrawColor(txtk, -1378294017);
TextDrawSetShadow(txtk, 0);
TextDrawSetOutline(txtk, 0);
TextDrawBackgroundColor(txtk, 51);
TextDrawFont(txtk, 1);
TextDrawSetProportional(txtk, 1);
txtl = TextDrawCreate(248.666671, 304.888763, "Respect players and admins");
TextDrawLetterSize(txtl, 0.300000, 1.000000);
TextDrawAlignment(txtl, 1);
TextDrawColor(txtl, -1378294017);
TextDrawSetShadow(txtl, 0);
TextDrawSetOutline(txtl, 0);
TextDrawBackgroundColor(txtl, 51);
TextDrawFont(txtl, 1);
TextDrawSetProportional(txtl, 1);
txtm = TextDrawCreate(258.333221, 337.659362, "Press 2 to close");
TextDrawLetterSize(txtm, 0.446333, 1.483851);
TextDrawAlignment(txtm, 1);
TextDrawColor(txtm, 65535);
TextDrawSetShadow(txtm, 0);
TextDrawSetOutline(txtm, 1);
TextDrawBackgroundColor(txtm, 51);
TextDrawFont(txtm, 1);
TextDrawSetProportional(txtm, 1);
}
CMD:lrules(playerid, params[])
{
TextDrawShowForAll(txta);
TextDrawShowForAll(txtb);
TextDrawShowForAll(txtc);
TextDrawShowForAll(txtd);
TextDrawShowForAll(txte);
TextDrawShowForAll(txtf);
TextDrawShowForAll(txtg);
TextDrawShowForAll(txth);
TextDrawShowForAll(txti);
TextDrawShowForAll(txtj);
TextDrawShowForAll(txtk);
TextDrawShowForAll(txtl);
TextDrawShowForAll(txtm);
}
public OnPlayerKeyStateChange()
{
if (PRESSED(KEY_SUBMISSION ))
{
TextDrawHideForPlayer(playerid, txta);
TextDrawHideForPlayer(playerid, txtb);
TextDrawHideForPlayer(playerid, txtc);
TextDrawHideForPlayer(playerid, txtd);
TextDrawHideForPlayer(playerid, txte);
TextDrawHideForPlayer(playerid, txtf);
TextDrawHideForPlayer(playerid, txtg);
TextDrawHideForPlayer(playerid, txth);
TextDrawHideForPlayer(playerid, txti);
TextDrawHideForPlayer(playerid, txtj);
TextDrawHideForPlayer(playerid, txtk);
TextDrawHideForPlayer(playerid, txtl);
TextDrawHideForPlayer(playerid, txtm);
}
return 1;
}
Empty function header? I'm rather surprised it isn't throwing the "function header doesn't match prototype" error.
it's because key submission is not key number 2.
so you have to use KEY_ANALOG_DOWN instead of KEY_SUBMISSION as it's for number 2
try an other key other than sub_mission, and if it worked then the problem is on this key. if It didn't work then post here again