new BlockCmd[MAX_PLAYERS];
BlockCmd[playerid] = 0;
if(strcmp("/mycommand", cmdtext, true) == 0)
{
if(BlockCmd[playerid] < 3)
{
BlockCmd[playerid]++;
// Do something here
}else SendClientMessage(playerid, COLOR, "SERVER: Command blocked :D");
return 1;
}
|
Originally Posted by Jefff
Top
Код:
new BlockCmd[MAX_PLAYERS]; Код:
BlockCmd[playerid] = 0; Код:
if(strcmp("/mycommand", cmdtext, true) == 0)
{
if(BlockCmd[playerid] < 3)
{
BlockCmd[playerid]++;
// Do something here
}else SendClientMessage(playerid, COLOR, "SERVER: Command blocked :D");
return 1;
}
|
|
Originally Posted by Jefff
Top
Код:
new BlockCmd[MAX_PLAYERS]; Код:
BlockCmd[playerid] = 0; Код:
if(strcmp("/mycommand", cmdtext, true) == 0)
{
if(BlockCmd[playerid] < 3)
{
BlockCmd[playerid]++;
// Do something here
new string[30];
format(string, 40, "/ xyi else can enter %d times " 3-BlockCmd[playerid]);
SendClientMessage(playerid, COLOR, string);
}else SendClientMessage(playerid, COLOR, "SERVER: Command blocked :D");
return 1;
}
|