[pawn]new INFO[256];[/pawn]
[pawn]public OnPlayerDeath(playerid, killerid, reason)
{
if ( killerid == INVALID_PLAYER_ID )
{
new string[ 128 ], reasonText[ 16 ];
switch( reason )
{
case 43: reasonText = "drowned";
case 255: reasonText = "suicide";
}
format( string, 128, "** %s is death reason [%s]", gPlayers[ playerid ], reasonText );
print( string );
new szMsg[256];
format( szMsg, sizeof( szMsg ),"[%s] is death reason [%s]",gPlayers[ playerid ], reasonText );
SendClientMessageToAll(AMARILLO, szMsg );// CHANGE FOR YOUR COLOUR
if ( GetPlayerMoney(playerid) > 199 ) MenosDinero(playerid,200);//change for you decplayerhandcash
QuitaSpree(playerid);
}
if (ObtenerSpree(killerid) == 4)
{
MasDinero(killerid,1500);// change for you incplayerhandcash
GameTextForPlayer(killerid,"~a~SPREE 5 Kills!!");
}
if (ObtenerSpree(killerid) == 9)
{
MasDinero(killerid,2000);// change for you incplayerhandcash
GameTextForPlayer(killerid,"~a~SPREE 10 Kills!!");
}
if (ObtenerSpree(killerid) == 14)
{
MasDinero(killerid,2500);// change for you incplayerhandcash
GameTextForPlayer(killerid,"~a~SPREE 15 Kills!!");
}
if (ObtenerSpree(killerid) == 19)
{
MasDinero(killerid,3500);// change for you incplayerhandcash
GameTextForPlayer(killerid,"~a~SPREE 20 Kills!!");
}
if (ObtenerSpree(killerid) == 24)
{
MasDinero(killerid,4500);// change for you incplayerhandcash
GameTextForPlayer(killerid,"~a~SPREE 25 Kills!!");
}
MasDinero(killerid,300);// change for you incplayerhandcash
SetPlayerHealth(killerid,100.0);
SetWantedLevel(killerid,6);
DarSpree(killerid,1);
QuitaSpree(playerid);
if ( GetPlayerMoney(playerid) > 199 ) MenosDinero(playerid,200); //change for you decplayerhandcash
return 1;
}[/pawn]
Publics
[pawn]//==============================================================================
public ObtenerSpree(playerid)
{
format(INFO,256, REGISTROS, gPlayers[playerid]);//change for you name of registers folders
new spree; spree = dini_Int(INFO,"Spree");
return spree;
}
public DarSpree( playerid, Amount )
{
format( file, sizeof( file ), REGISTROS, gPlayers[ playerid ] );//change for you name of registers folders
new asesinados; asesinados = dini_Int( file, "Spree" );
dini_IntSet( file, "Spree", asesinados +Amount);
}
//==============================================================================
public QuitaSpree(playerid)
{
format(INFO,256, REGISTROS, gPlayers[playerid]);//change for you name of registers folders
dini_Unset(INFO,"Spree");
}
//==============================================================================[/pawn]