Fiz outros dms seguindo a idйia do Stronda... Porйm,
. Os demais nгo. Veja como ficou:
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
new name[MAX_PLAYER_NAME+1];
GetPlayerName(playerid, name, sizeof(name));
new matou[MAX_PLAYER_NAME+1];
GetPlayerName(killerid, matou, sizeof(matou));
if(killerid == INVALID_PLAYER_ID)
{
if(TaX1[playerid] == true){ TaX1[playerid] = false, format(string, sizeof(string), "[SERVER]: %s suicidou-se no x1!", name);
SendClientMessageToAll(COR_AMARELO, string), Playersx1 = 0;}
for(new i; i < MAX_PLAYERS; i++)
if(TaX1[i] == true) {SpawnPlayer(TaX1[i]), TaX1[TaX1[i]] = false, SetPlayerHealth(TaX1[i], 100.0);}
if(TaMG[playerid] == true){ TaMG[playerid] = false, format(string, sizeof(string), "[SERVER]: %s suicidou-se no Minigun!", name);
SendClientMessageToAll(COR_AMARELO, string), Playersmg = 0;}
for(new i; i < MAX_PLAYERS; i++)
if(TaMG[i] == true) {SpawnPlayer(TaMG[i]), TaMG[TaMG[i]] = false, SetPlayerHealth(TaMG[i], 100.0);}
if(TaSN[playerid] == true){ TaSN[playerid] = false, format(string, sizeof(string), "[SERVER]: %s suicidou-se no SniperDM!", name);
SendClientMessageToAll(COR_AMARELO, string), Playerssn = 0;}
for(new i; i < MAX_PLAYERS; i++)
if(TaSN[i] == true) {SpawnPlayer(TaSN[i]), TaSN[TaSN[i]] = false;}
if(Ta69[playerid] == true){ Ta69[playerid] = false, format(string, sizeof(string), "[SERVER]: %s suicidou-se na Бrea 69!", name);
SendClientMessageToAll(COR_AMARELO, string), Players69 = 0;}
for(new i; i < MAX_PLAYERS; i++)
if(Ta69[i] == true) {SpawnPlayer(Ta69[i]), Ta69[Ta69[i]] = false;}
if(TaRPG[playerid] == true){ TaRPG[playerid] = false, format(string, sizeof(string), "[SERVER]: %s suicidou-se no RPGDM!", name);
SendClientMessageToAll(COR_AMARELO, string), Playersrpg = 0;}
for(new i; i < MAX_PLAYERS; i++)
if(TaRPG[i] == true) {SpawnPlayer(TaRPG[i]), TaRPG[TaRPG[i]] = false;}
}
else
{
if(TaX1[playerid] == true){
TaX1[playerid] = false, TaX1[killerid] = false, TaX1[playerid] = false, Playersx1 = 0, SpawnPlayer(killerid);
SetPlayerArmour(killerid, 100.0), SetPlayerHealth(killerid, 100.0);
format(string, sizeof(string), "[SERVER] %d matou o %s no X1!", name, matou), SendClientMessageToAll(COR_AMARELO, string);}
}
if(TaMG[playerid] == true){
TaMG[playerid] = false, TaMG[killerid] = false, Playersmg = 0, SpawnPlayer(killerid);
SetPlayerArmour(killerid, 100.0), SetPlayerHealth(killerid, 100.0), GivePlayerWeapon(killerid,38,800);
format(string, sizeof(string), "[SERVER] %d matou o %s no MinigunDM e recebeu a sua minigun!", matou, name), SendClientMessageToAll(COR_AMARELO, string);
}
if(TaSN[playerid] == true){
TaSN[playerid] = false, TaSN[killerid] = false, Playerssn = 0, SpawnPlayer(killerid);
SetPlayerArmour(killerid, 100.0), SetPlayerHealth(killerid, 100.0), GivePlayerWeapon(killerid,34,1000);
format(string, sizeof(string), "[SERVER] %d matou o %s no SniperDM e ganhou sua Sniper!", matou, name), SendClientMessageToAll(COR_AMARELO, string);
}
if(Ta69[playerid] == true){
Ta69[playerid] = false, Ta69[killerid] = false, Players69 = 0, SpawnPlayer(killerid);
SetPlayerArmour(killerid, 100.0), SetPlayerHealth(killerid, 100.0);
format(string, sizeof(string), "[SERVER] %d matou o %s na Бrea 69!", matou, name), SendClientMessageToAll(COR_AMARELO, string);
}
if(TaRPG[playerid] == true){
TaRPG[playerid] = false, TaRPG[killerid] = false, Playersrpg = 0, SpawnPlayer(killerid);
SetPlayerArmour(killerid, 100.0), SetPlayerHealth(killerid, 100.0), GivePlayerWeapon(killerid,35,1000);
format(string, sizeof(string), "[SERVER] %d matou o %s no RPG DM e ganhou sua RPG!", matou, name), SendClientMessageToAll(COR_AMARELO, string);
}
SendDeathMessage(killerid, playerid, reason);
GivePlayerMoney(playerid, -500);
GivePlayerMoney(killerid, 500);
GameTextForPlayer(playerid,"~r~Morto!",4000,3);
new Texto[30], Texto1[30];
ProgressaoInfo[killerid][Matou] ++;
ProgressaoInfo[playerid][Morreu] ++;
ProgressaoInfo[killerid][Pontos] = (ProgressaoInfo[killerid][Matou] - ProgressaoInfo[killerid][Morreu]);
ProgressaoInfo[playerid][Pontos] = (ProgressaoInfo[playerid][Matou] - ProgressaoInfo[playerid][Morreu]);
format(Texto, sizeof(Texto), "~l~Pontos: ~b~%d", ProgressaoInfo[killerid][Pontos]);
TextDrawSetString(ProgressaoInfo[killerid][TPontos], Texto);
TextDrawShowForPlayer(killerid, ProgressaoInfo[killerid][TPontos]);
format(Texto1, sizeof(Texto1), "~l~Pontos: ~b~%d", ProgressaoInfo[playerid][Pontos]);
TextDrawSetString(ProgressaoInfo[playerid][TPontos], Texto1);
TextDrawShowForPlayer(playerid, ProgressaoInfo[playerid][TPontos]);
AtualizarText(playerid);
AtualizarText(killerid);
TextDrawHideForPlayer(playerid,txtTimeDisp);
TextDrawHideForPlayer(playerid,txtDateDisp);
if(IsPlayerConnected(killerid))
{
Matouu[killerid]++;
}
Morreuu[playerid]++;
return 1;
}