[Ajuda] Matar fora da area de DM
#1

bom nessa funзгo o player mata fora da area de dm e vai preso automaticamente, queria que mostrasse a mensagem pra todos:

pawn Код:
if(dini_Int(file2, "DM") == 1){
for(new i=0; i<MAX_PLAYERS; i++){
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), P_CONTAS, aname);
new plid;
GameTextForPlayer(plid,"~b~PRESO", 5000, 0);
SetPlayerPos(plid, 263.8820,77.4002,1001.0391);
SetPlayerInterior(plid, 6);
SetPlayerHealth(plid, 99999);
ResetPlayerWeapons(plid);
dini_IntSet(file2, "Preso", 1);
format(string, sizeof(string), "{2F7AFC} | PRISГO | %s matou %s fora da бrea de DM e foi preso automaticamente!", kname, aname);
SendClientMessage(i, Amarelo, string);
}
}
return 1;
}
Ja tentei usar o SendClientMessageToAll e nгo deu, deu error!
Reply
#2

Vocк tem que usar a funзгo no OnPlayerDeath.
Reply
#3

pawn Код:
if(dini_Int(file2, "DM") == 1){
for(new i=0; i<MAX_PLAYERS; i++){
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), P_CONTAS, aname);
new plid;
GameTextForPlayer(plid,"~b~PRESO", 5000, 0);
SetPlayerPos(plid, 263.8820,77.4002,1001.0391);
SetPlayerInterior(plid, 6);
SetPlayerHealth(plid, 99999);
ResetPlayerWeapons(plid);
dini_IntSet(file2, "Preso", 1);
format(string, sizeof(string), "{2F7AFC} | PRISГO | %s matou %s fora da бrea de DM e foi preso automaticamente!", kname, aname,playerid);
SendClientMessageToAll(-1, string);
}
}
return 1;
}
tenta
Reply
#4

Compilou vou testar!
Reply
#5

dEU CERTO Mas a mensagem fika floodando no chat e vc fika todo lagado tipo sei laaa
ai fika travando e fica apatrecendo PRESO PRESO no meio da tela sem parar
Reply
#6

Ele vai ficar floodando, pq estб dentro do if...
Reply
#7

e outra qnd eu to na area de DM e mato o meu amigo eu vo preso tbm
Reply
#8

esta assim!
pawn Код:
GameTextForPlayer(plid,"~b~PRESO", 5000, 0);
nao seria assim ?
pawn Код:
GameTextForPlayer(playerid,"~b~PRESO", 5000, 0);
Reply
#9

pawn Код:
if(dini_Int(file2, "DM") == 1){
new plid;
for(new i; i != MAX_PLAYERS; i++){
if(IsPlayerConnected(plid)) continue;
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), P_CONTAS, aname);
GameTextForPlayer(plid,"~b~PRESO", 5000, 0);
SetPlayerPos(plid, 263.8820,77.4002,1001.0391);
SetPlayerInterior(plid, 6);
SetPlayerHealth(plid, 99999);
ResetPlayerWeapons(plid);
dini_IntSet(file2, "Preso", 1);
format(string, sizeof(string), "{2F7AFC} | PRISГO | %s matou %s fora da бrea de DM e foi preso automaticamente!", kname, aname,playerid);
SendClientMessageToAll(-1, string);
}
}
return 1;
}
@Edit - billy
Nгo, pois estб enviando a mensagem para todos do servidor e, nгo apenar para o player.
Reply
#10

Entгo vocк tem que colocar alguma condiзгo para que quando o player estiver na arena ele nгo entre nesse if.

Exemplo: ArenaDM[playerid] == true;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)