Posts: 270
Threads: 41
Joined: Sep 2013
pawn Код:
COMMAND:rules(playerid, params[]) // or CMD:rules(playerid, params[])
{
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;
}
try this.
Posts: 241
Threads: 13
Joined: Jan 2014
Quote:
Originally Posted by Abagail
pawn Код:
CMD:rules(playerid, params[]) { 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; }
|
U have added a unmatched "}". Below is the right codes!
pawn Код:
CMD:rules(playerid, params[])
{
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;
}
EDIT: too late