SA-MP Forums Archive
[Ajuda] Ajuda - 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] Ajuda (/showthread.php?tid=476366)



Ajuda - Superextreme - 17.11.2013

Olб Pessoal, Eu Quero Saber Como Eu Faзo Pra Quando Uma Pessoa Matar Outra, Esta Pessoa Que Matou Ganhar Dinheiro.

Por Favor Me Ajudem


Re: Ajuda - smiiir - 17.11.2013

pawn Код:
public OnPlayerDeath ( playerid, killerid, reason ) {

    new Celulas [ 128 ] ;

    new Money = ( 1000 + random ( 4500 ) ) ;

    format ( Celulas, 128, "[ AVISO ]: %s matou %s e recebeu %d", Nick ( killerid ), Nick ( playerid ), Money ) ;
    SendClientMessageToAll ( -1, Celulas ) ;

    GivePlayerMoney ( killerid, Money ) ;
    return true ;
}


stock Nick ( playerid ) {

    new NOME [ 21 ] ;
    GetPlayerName ( playerid, NOME, 21 ) ;
    return NOME ;
}



Re: Ajuda - Ley - 17.11.2013

PHP код:
public OnPlayerDeathplayeridkilleridreason 
{
    
GivePlayerMoneykilleridvalor);
    return 
true ;

No 'valor', adicione o valor desejado que o matador irб receber.


Re: Ajuda - Catchorro - 17.11.2013

Quote:

public OnPlayerDeath(playerid, killerid, reason)
{
GivePlayerMoney(killerid, Valor);
GameTextForPlayer(killerid, "~r~Ganhou Uma Grana !", 5000, 2);
return 1;
}

Mude o valor pra sua quantia e o ''Ganhou uma Grana'' a qual vc preferir !

-----------------------------------------------------
Ou
-----------------------------------------------------

Quote:

public OnPlayerDeath(playerid, killerid, reason)
{
GivePlayerMoney(playerid, -Valor);
GameTextForPlayer(playerid, "~r~Perdeu Uma Grana !", 5000, 2);
return 1;
}

Mude o valor pra sua quantia e o ''Perdeu uma Grana'' a qual vc preferir !


Respuesta: Ajuda - Superextreme - 17.11.2013

Vlw Catchorro