if(strcmp(cmd, "/contagem", true) == 0)
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(pAdmin[playerid] == 5) {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, Vermelho, "Uso: /contagem [quantia]");
return 1;
}
new contando = strval(tmp);
for(new i=0; i < MAX_PLAYERS; i++) {
if(noevento[i] == 1) {
contar[i] = contando;
contagem[i] = SetTimerEx("Contagem", 1000, true, "i", i);
}
}
}
else {
SendClientMessage(playerid, Vermelho, "* Vocк nгo tem acesso a esse comando!");
}
return 1;
}
new Float:Coords[3];
GetPlayerPos(playerid,Coords[0],Coords[1],Coords[2]);
for(new x = 0; x != MAX_PLAYERS; x++)
{
if(IsPlayerInRangeOfPoint(x,80.0,Coords[0],Coords[1],Coords[2])) // Onde esta 80.0 = a distancia,para ser vista.
{
if(strcmp(cmd, "/contagem", true) == 0)
{
if(pAdmin[playerid] == 5)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, Vermelho, "Uso: /contagem [quantia]");
return 1;
}
new contando = strval(tmp);
for(new i=0; i < MAX_PLAYERS; i++)
{
if(noevento[i] == 1)
{
if(GetDistanceBetweenPlayers(playerid, i) < 25)
{
contar[i] = contando;
contagem[i] = SetTimerEx("Contagem", 1000, true, "i", i);
}
}
}
else {
SendClientMessage(playerid, Vermelho, "* Vocк nгo tem acesso a esse comando!");
}
return 1;
}
Adicione no code :
pawn Код:
se der erro avise. |