23.03.2014, 13:37
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/rules") && Showing[playerid] == 0)
{
if(Showing[playerid] == 1)
{
Showing[playerid] = 0;
TextDrawHideForPlayer(playerid, Rules0);
TextDrawHideForPlayer(playerid, Rules1);
TextDrawHideForPlayer(playerid, Rules2);
TextDrawHideForPlayer(playerid, Rules3);
TextDrawHideForPlayer(playerid, Rules4);
TextDrawHideForPlayer(playerid, Rules5);
TextDrawHideForPlayer(playerid, Rules6);
TextDrawHideForPlayer(playerid, Rules7);
TextDrawHideForPlayer(playerid, Rules9);
TextDrawHideForPlayer(playerid, RulesGod);
TextDrawHideForPlayer(playerid, Rules10);
TextDrawHideForPlayer(playerid, Rules11);
TextDrawHideForPlayer(playerid, Rules12);
TextDrawHideForPlayer(playerid, Rules13);
TextDrawHideForPlayer(playerid, Rules14);
TextDrawHideForPlayer(playerid, Rules15);
}
else
{
Showing[playerid] = 1;
TextDrawShowForPlayer(playerid, Rules0);
TextDrawShowForPlayer(playerid, Rules1);
TextDrawShowForPlayer(playerid, Rules2);
TextDrawShowForPlayer(playerid, Rules3);
TextDrawShowForPlayer(playerid, Rules4);
TextDrawShowForPlayer(playerid, Rules5);
TextDrawShowForPlayer(playerid, Rules6);
TextDrawShowForPlayer(playerid, Rules7);
TextDrawShowForPlayer(playerid, Rules9);
TextDrawShowForPlayer(playerid, RulesGod);
TextDrawShowForPlayer(playerid, Rules10);
TextDrawShowForPlayer(playerid, Rules11);
TextDrawShowForPlayer(playerid, Rules12);
TextDrawShowForPlayer(playerid, Rules13);
TextDrawShowForPlayer(playerid, Rules14);
TextDrawShowForPlayer(playerid, Rules15);
SetTimerEx("HideTextdraws", 20000, 0, "i", playerid);
}
}
return 1;
}