SA-MP Forums Archive
[AJUDA] Ratio em meu /Status - 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] Ratio em meu /Status (/showthread.php?tid=162375)



[AJUDA] Ratio em meu /Status - Kasura - 23.07.2010

Ola estoucom 1 problema.... nгo consigo implantar ratio em meu comando /status.... gostaria de adicionar alguem me ajuda?

Код:
if(strcmp(cmd, "/status", true) == 0)
{
new tmp[256];
tmp = strtok(cmdtext, idx);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "&~&~&~&~&~&~&~&~&~&~STATUS~&~&~&~&~&~&&~&~&~&");
format(string, sizeof(string), "Matou: %d", status[playerid][0]);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "Morreu: %d", status[playerid][1]);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "Se Suicidou: %d", status[playerid][2]);
SendClientMessage(playerid, COLOR_WHITE, string);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "&~&~&~&~&~&~&~&~&~&~&~&~&~&~&~&~&~&~&~&~&~&~&");
return 1;
}
alguem pode ajudar?pois tentei diversos metodos e nada =/


Re: [AJUDA] Ratio em meu /Status - SlashPT - 23.07.2010

metes isso assim

pawn Код:
//no topo

new status[playerid][3];

// no onplayercommand text

if(strcmp(cmd, "/status", true) == 0)
{
new tmp[256];
tmp = strtok(cmdtext, idx);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "&~&~&~&~&~&~&~&~&~&~STATUS~&~&~&~&~&~&&~&~&~&");
format(string, sizeof(string), "Matou: %d", status[playerid][0]);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "Morreu: %d", status[playerid][1]);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "Se Suicidou: %d", status[playerid][2]);
SendClientMessage(playerid, COLOR_WHITE, string);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "&~&~&~&~&~&~&~&~&~&~&~&~&~&~&~&~&~&~&~&~&~&~&");
return 1;
}

//depois no onplayerdeath

status[killerid][0]++;
status[playerid][1]++;
if(killerid == playerid || killerid == -1)
{
status[playerid][3]++;
}
so o sistema de suicidio nao sei se e bem assim nao testei tou com pressa...


Re: [AJUDA] Ratio em meu /Status - Kasura - 23.07.2010

Nгo funcionou n =/

e tipuw ja tenho

new status[MAX_PLAYERS][3];

no meu server

tipuw ja tenho esse treco no on player death

eu vi que tem uns Ratios que й na propria msg os comandos pra mostrar o ratio porem йra muito diferente e nгo consegui mudar para minhas variaveis.