if(dini_Int(file2, "DM") == 1){ format(string, sizeof(string), "{15AD70}[!] %s matou o jogador %s e estб sendo procurado pela Policia!",kname, aname); SendClientMessageToAll(0x00A600AA, string); SetPlayerWantedLevel(killerid, 0); dini_IntSet(file2, "Procurado", 1); Procurados[killerid] = 1; SetPlayerWantedLevel(killerid, 6); GivePlayerGrana(killerid,GetPlayerMoney(playerid)); ResetPlayerGrana(playerid); SetPlayerWantedLevel(killerid, GetPlayerWantedLevel(killerid)+6); } } return 1; }
Nгo vi nada de procurado para o player que morre amigo, mande a OnPlayerDeath toda..
|
public OnPlayerDeath(playerid, killerid, reason) { TextDrawHideForPlayer(playerid,txtDateDisp); TextDrawHideForPlayer(playerid,txtTimeDisp); if(killerid == INVALID_PLAYER_ID) { SendDeathMessage(INVALID_PLAYER_ID,playerid,reason); new kname[MAX_PLAYER_NAME]; GetPlayerName(killerid, kname, MAX_PLAYER_NAME); format(file2, sizeof(file2), PASTA_CONTAS, kname); new aname[MAX_PLAYER_NAME]; GetPlayerName(playerid, aname, MAX_PLAYER_NAME); format(file, sizeof(file), PASTA_CONTAS, aname); PlayerInfo[playerid][pUsoudroga] = 0 ; if(PlayerInfo[playerid][pPlano] == 0){ SendClientMessage(playerid, Branco, " | INFO | Vocк perdeu a consciкncia e foi levado para hospital mais prуximo."); SendClientMessage(playerid, Branco, " | INFO | Foi retirado 600,00 R$ de sua conta bancбria para pagar o tratamento!"); SendClientMessage(playerid, Branco, " | INFO | Adquira seu convкnio mйdico e pague 100,00 mensais!"); dini_IntSet(file, "SaldoBancario", dini_Int(file, "SaldoBancario")-600); TogglePlayerControllable(playerid, 1); }
public OnPlayerDeath(playerid, killerid, reason)
{
TextDrawHideForPlayer(playerid,txtDateDisp);
TextDrawHideForPlayer(playerid,txtTimeDisp);
if(killerid == INVALID_PLAYER_ID)
{
SendDeathMessage(INVALID_PLAYER_ID,playerid,reason);
new kname[MAX_PLAYER_NAME];
GetPlayerName(killerid, kname, MAX_PLAYER_NAME);
format(file2, sizeof(file2), PASTA_CONTAS, kname);
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
PlayerInfo[playerid][pUsoudroga] = 0 ;
if(PlayerInfo[playerid][pPlano] == 0)
{
SendClientMessage(playerid, Branco, " | INFO | Vocк perdeu a consciкncia e foi levado para hospital mais prуximo.");
SendClientMessage(playerid, Branco, " | INFO | Foi retirado 600,00 R$ de sua conta bancбria para pagar o tratamento!");
SendClientMessage(playerid, Branco, " | INFO | Adquira seu convкnio mйdico e pague 100,00 mensais!");
dini_IntSet(file, "SaldoBancario", dini_Int(file, "SaldoBancario")-600);
TogglePlayerControllable(playerid, 1);
}
}
return true;
}
public OnPlayerDeath(playerid, killerid, reason)
{
TextDrawHideForPlayer(playerid,txtDateDisp);
TextDrawHideForPlayer(playerid,txtTimeDisp);
if(killerid == INVALID_PLAYER_ID)
{
SendDeathMessage(INVALID_PLAYER_ID,playerid,reason);
new kname[MAX_PLAYER_NAME];
GetPlayerName(killerid, kname, MAX_PLAYER_NAME);
format(file2, sizeof(file2), PASTA_CONTAS, kname);
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
PlayerInfo[playerid][pUsoudroga] = 0 ;
if(PlayerInfo[playerid][pPlano] == 0)
{
SendClientMessage(playerid, Branco, " | INFO | Vocк perdeu a consciкncia e foi levado para hospital mais prуximo.");
SendClientMessage(playerid, Branco, " | INFO | Foi retirado 600,00 R$ de sua conta bancбria para pagar o tratamento!");
SendClientMessage(playerid, Branco, " | INFO | Adquira seu convкnio mйdico e pague 100,00 mensais!");
dini_IntSet(file, "SaldoBancario", dini_Int(file, "SaldoBancario")-600);
TogglePlayerControllable(playerid, 1);
}
}
return true;
}
if(dini_Int(file2, "DM") == 1){ format(string, sizeof(string), "{15AD70}[!] %s matou o jogador %s e estб sendo procurado pela Policia!",kname, aname); SendClientMessageToAll(0x00A600AA, string); SetPlayerWantedLevel(killerid, 0); dini_IntSet(file2, "Procurado", 1); Procurados[killerid] = 1; SetPlayerWantedLevel(killerid, 6); GivePlayerGrana(killerid,GetPlayerMoney(playerid)); ResetPlayerGrana(playerid); SetPlayerWantedLevel(killerid, GetPlayerWantedLevel(killerid)+6); } } return 1; }
e ta em qual callback isso ai se nгo esta na OnPlayerDeath '-'?
|
public OnPlayerDeath(playerid, killerid, reason) { TextDrawHideForPlayer(playerid,txtDateDisp); TextDrawHideForPlayer(playerid,txtTimeDisp); if(killerid == INVALID_PLAYER_ID) { SendDeathMessage(INVALID_PLAYER_ID,playerid,reason); new kname[MAX_PLAYER_NAME]; GetPlayerName(killerid, kname, MAX_PLAYER_NAME); format(file2, sizeof(file2), PASTA_CONTAS, kname); new aname[MAX_PLAYER_NAME]; GetPlayerName(playerid, aname, MAX_PLAYER_NAME); format(file, sizeof(file), PASTA_CONTAS, aname); PlayerInfo[playerid][pUsoudroga] = 0 ; if(PlayerInfo[playerid][pPlano] == 0){ SendClientMessage(playerid, Branco, " | INFO | Vocк perdeu a consciкncia e foi levado para hospital mais prуximo."); SendClientMessage(playerid, Branco, " | INFO | Foi retirado 600,00 R$ de sua conta bancбria para pagar o tratamento!"); SendClientMessage(playerid, Branco, " | INFO | Adquira seu convкnio mйdico e pague 100,00 mensais!"); dini_IntSet(file, "SaldoBancario", dini_Int(file, "SaldoBancario")-600); TogglePlayerControllable(playerid, 1); }
if(dini_Int(file2, "DM") == 1){ format(string, sizeof(string), "{15AD70}[!] %s matou o jogador %s e estб sendo procurado pela Policia!",kname, aname); SendClientMessageToAll(0x00A600AA, string); SetPlayerWantedLevel(killerid, 0); dini_IntSet(file2, "Procurado", 1); Procurados[killerid] = 1; SetPlayerWantedLevel(killerid, 6); GivePlayerGrana(killerid,GetPlayerMoney(playerid)); ResetPlayerGrana(playerid); } } return 1; }