SA-MP Forums Archive
[Ajuda] Problema adm - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Problema adm (/showthread.php?tid=619758)



Problema adm - GMVega - 21.10.2016

Eu to com a GM Play Shot
Eu me dou o adm 3000 (desenvolvedor)
Mais tem alguns comandos que eu nгo consigo dar tipo
/dargrana
/setgrana


Re: Problema adm - Wellington1999 - 21.10.2016

Mano, pega e abre o gm, vai nesses comandos e vк a restriзгo antes de criar um tуpico


Re: Problema adm - GMVega - 21.10.2016

//----------------------------------[GiveMoney]------------------------------------------------
if(strcmp(cmd, "/dargrana", true) == 0 || strcmp(cmd, "/setgrana", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /dargrana [id] [grana]");
return 1;
}
new playa;
new money;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
money = strval(tmp);
if(ServerOwner[playerid] == 1)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
ConsumingMoney[playa] = 1;
GivePlayerMoney(playa, money);
format(string,sizeof(string), "AdmAviso: %s {FFFF00}Estб Dando [{80F0FF}R$ %d{FFFF00}] de Dinheiro para: %s",PlayerName(playerid),money,PlayerName(playa) );
ABroadCast(COLOR_YELLOW,string,1);
format(gstring, sizeof(gstring), "** Vocк Recebeu [R$ %d] do Admin: %s Nao Gaste Atoa", money, PlayerName(playerid));
SendClientMessage(playa, COLOR_LIGHTBLUE, gstring);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк Nгo tem altorizaзao para Efetuar esse Comando !");
}
}
return 1;
}


Re: Problema adm - Wellington1999 - 21.10.2016

Код:
if(ServerOwner[playerid] == 1)
{
FIO UTIL

Код:
CMD:virarowner(playerid)
{
    ServerOwner[playerid] = 1;
    return 1;
}



Re: Problema adm - GMVega - 21.10.2016

Onde eu boto isso ? Arruma pra mim o codigo e me manda


Re: Problema adm - Wellington1999 - 21.10.2016

Quote:
Originally Posted by GMVega
Посмотреть сообщение
Onde eu boto isso ? Arruma pra mim o codigo e me manda
Muda ServerOwner[playerid] por PlayerInfo[playerid][pAdmin] == 3000;


Re: Problema adm - GMVega - 21.10.2016

Quote:
Originally Posted by Wellington1999
Посмотреть сообщение
Muda ServerOwner[playerid] por PlayerInfo[playerid][pAdmin] == 3000;
Mudei e deu o erro
C:\Users\DG\Desktop\Brasil Play Shot\gamemodes\BPS.pwn(45150) : warning 215: expression has no effect
C:\Users\DG\Desktop\Brasil Play Shot\gamemodes\BPS.pwn(45166) : error 029: invalid expression, assumed zero


Re: Problema adm - GMVega - 21.10.2016

Jб arrumei