[Ajuda] Oque tem de errado com esse comando? - 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] Oque tem de errado com esse comando? (
/showthread.php?tid=441825)
Oque tem de errado com esse comando? -
Pedro_BPP - 04.06.2013
Oi gente? eu digito o comando /cabecas mais simplesmente nada acontece... nem uma mensagem, nem nada... tambйm nao fala que ele nao existe...
pawn Код:
if(strcmp(cmd, "/cabecas", true) == 0)
{
for(new i = 0; i < MAX_PLAYERS; ++i)
{
if(Matou[i] >= 2)
{
format(stringrecompensa, sizeof(stringrecompensa), "%s - $%d - Matou: %d", NomeCara(i), GetarDado(i, Recompensa), GetarDado(i, Matou));
SendClientMessage(playerid, Verde, stringrecompensa);
}
}
return 1;
}
alguйm pode me ajudar?
Re: Oque tem de errado com esse comando? -
-GooGle- - 04.06.2013
pawn Код:
if(strcmp(cmd, "/cabecas", true) == 0)
{
if(IsPlayerConnected(playerid)){
SendClientMessage(playerid, -1, "Cabeзas:");
for(new i = 0; i < MAX_PLAYERS; i++){
if(IsPlayerConnected(i)){
if(Matou[i] >= 2){
format(stringrecompensa, sizeof(stringrecompensa), "%s - $%d - Matou: %d", NomeCara(i), GetarDado(i, Recompensa), GetarDado(i, Matou));
SendClientMessage(playerid, Verde, stringrecompensa);
}
}
}
}//Fiz como base num comando /admins,crйditos do comando /admins desconheзo.
return 1;
}
Re: Oque tem de errado com esse comando? -
iMega - 04.06.2013
pawn Код:
if(strcmp(cmd, "/cabecas", true) == 0)
{
new count = 0;
for(new i = 0; i < MAX_PLAYERS; ++i)
{
if(IsPlayerConnected(i))
{
if(Matou[i] >= 2)
{
format(stringrecompensa, sizeof(stringrecompensa), "%s - $%d - Matou: %d", NomeCara(i), GetarDado(i, Recompensa), GetarDado(i, Matou));
SendClientMessage(playerid, Verde, stringrecompensa);
count++;
}
}
if(count == 0)
{
SendClientMessage(playerid, Verde, "Nenhuma cabeзa estб na lista !");
}
}
return 1;
}
tente assim.
Respuesta: Re: Oque tem de errado com esse comando? -
Pedro_BPP - 04.06.2013
Quote:
Originally Posted by -******-
pawn Код:
if(strcmp(cmd, "/cabecas", true) == 0) { if(IsPlayerConnected(playerid)){ SendClientMessage(playerid, -1, "Cabeзas:"); for(new i = 0; i < MAX_PLAYERS; i++){ if(IsPlayerConnected(i)){ if(Matou[i] >= 2){ format(stringrecompensa, sizeof(stringrecompensa), "%s - $%d - Matou: %d", NomeCara(i), GetarDado(i, Recompensa), GetarDado(i, Matou)); SendClientMessage(playerid, Verde, stringrecompensa); } } } }//Fiz como base num comando /admins,crйditos do comando /admins desconheзo. return 1; }
|
obrigado,resolvido!!