16.08.2013, 23:10
Olб, quando voce mata alguem no x1, voce fica procurado !! Como tirar isso ?
if(strcmp(cmd, "/trazertodosx1", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 2)
{
if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1341)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
return 1;
}
GetPlayerPos(playerid, trazerx, trazery, trazerz);
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
TrazerTodosX1[i] = 1;
SendClientMessage(i ,COLOR_LIGHTBLUE, "Admin estб chamando todos para um evento de X1!");
SendClientMessage(i ,COLOR_LIGHTBLUE, "Digite 'Sim' para ir e 'Nao' para continuar onde estб.");
OnTrazerX1 = 1;
}
}
if(TrazerTodosX1[playerid] == 1)
{
SetPlayerPos(playerid,-2326.8809,-1636.9822,483.7031);
SendClientMessage(playerid ,COLOR_LIGHTRED, "Vocк ativou o /trazertodosx1!");
TrazerTodosX1[playerid] = 0;
return 1;
}
if(OnTrazerX1 == 1)
{
SendClientMessage(playerid ,COLOR_GREY, "Ja estгo usando /trazertodos,use /destruirtrazer para criar outro!");
return 1;
}
return 1;
}
return 1;
}
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
new Float:px,Float:py,Float:pz;
PlayerInactivity[playerid] = 0;
//DropWeapons(playerid);
//DropVida(playerid);
gPlayerSpawned[playerid] = 0;
PlayerInfo[playerid][pLocal] = 255;
GetPlayerPos(playerid, px, py, pz);
spawnado[playerid] = 0;
//if(killerid == INVALID_PLAYER_ID)
//{
// SendDeathMessage(INVALID_PLAYER_ID,playerid,reason);
//}
if (gPlayerTerminal[playerid] != 0)
{
BusrouteEnd(playerid);
}
if(PlayerPaintballing[killerid] == 0)
{
SetPlayerCriminal(killerid, 255, "Assasinato");
PlayerInfo[killerid][pKills] += 1;
}
if(TendoGuerra == 1 && IsPlayerInTerritorio(playerid) && IsPlayerInTerritorio(killerid))
{
if(PlayerInfo[killerid][pMembro] == 3 || PlayerInfo[killerid][pLider] == 3)
{
if(PlayerInfo[playerid][pMembro] == 6 || PlayerInfo[playerid][pLider] == 6)
{
Territorio[talmortos] += 1;
}
if(PlayerInfo[playerid][pMembro] == 15 || PlayerInfo[playerid][pLider] == 15)
{
Territorio[almortos] += 1;
}
}
if(PlayerInfo[killerid][pMembro] == 6 || PlayerInfo[killerid][pLider] == 6)
{
if(PlayerInfo[playerid][pMembro] == 3 || PlayerInfo[playerid][pLider] == 3)
{
Territorio[exemortos] += 1;
}
if(PlayerInfo[playerid][pMembro] == 15 || PlayerInfo[playerid][pLider] == 15)
{
Territorio[almortos] += 1;
}
}
if(PlayerInfo[killerid][pMembro] == 15 || PlayerInfo[killerid][pLider] == 15)
{
if(PlayerInfo[playerid][pMembro] == 3 || PlayerInfo[playerid][pLider] == 3)
{
Territorio[exemortos] += 1;
}
if(PlayerInfo[playerid][pMembro] == 6 || PlayerInfo[playerid][pLider] == 6)
{
Territorio[talmortos] += 1;
}
}
}
new TaNoEvento1337vidaloka[playerid]; //Cria a variavel que diz que o jogador tб no evento.
if(TrazerTodosX1[playerid] == 1) //Var que manda todos os players para o evento
{
SetPlayerPos(playerid,-2326.8809,-1636.9822,483.7031); //Seta a posiзгo do player
SendClientMessage(playerid ,COLOR_LIGHTRED, "Vocк ativou o /trazertodosx1!"); //Envia a mensagem
TrazerTodosX1[playerid] = 0; //Redefine a var para que o comando possa ser usado novamente.
TaNoEvento1337vidaloka[playerid]=1; //Define a var que criamos para 1, ou seja, o jogador estб no evento.
return 1;
}
if(PlayerPaintballing[killerid] == 0) //Aqui checa se o Killer estб no Paintball (Isso й algum script no seu GM).
{
if(TaNoEvento1337vidaloka[killerid] == 1) //Chega se o killer estб no evento.
{
TaNoEvento1337vidaloka[playerid]=0; //Aqui retira o jogador que morreu do evento.
return 1; //Aqui faz a loop retornar, ou seja, ela nгo irб passar daqui em diante. O "SetPlayerCriminal" e o "PlayerInfo..." serгo ignorados.
//Entгo se o SetPlayerCriminal for ignorado, nгo serб dado a estrela de procurado ao killer.
}
SetPlayerCriminal(killerid, 255, "Assasinato"); //Aqui, pelo que entendi, dб o nнvel de procurado ao killer.
PlayerInfo[killerid][pKills] += 1;
}