Vice City Multiplayer
VC:MP 0.3 => mIRC/pawn Scripting => Snippet Showroom => Topic started by: aledark24 on May 02, 2013, 08:31:24 pm
-
[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]
-
First look: You used too many "if" . Try to use "switch".
-
First look: You used too many "if" . Try to use "switch".
but working well....
whit not bugs..
-
aledark you did this system spree more thing, This system will only function normally on the server that you created not the other type, REGISTROS, MasDinero, MenosDinero...
-
aledark you did this system spree more thing, This system will only function normally on the server that you created not the other type, REGISTROS, MasDinero, MenosDinero...
read....
[pawn]
//change for you name of register folder...
//change for you incplayerhandcash
//change for you decplayerhandcash
// CHANGE FOR YOUR COLOUR
// if you are scripter... you understand, and change for you warchief...
[/pawn]
-
aledark you did this system spree more thing, This system will only function normally on the server that you created not the other type, REGISTROS, MasDinero, MenosDinero...
read....
[pawn]
//change for you name of register folder...
//change for you incplayerhandcash
//change for you decplayerhandcash
// if you are scripter... you understand, and change for you warchief...
[/pawn]
[pawn]Amarillo to YELLOW...[/pawn]
-
First look: You used too many "if" . Try to use "switch".
but working well....
whit not bugs..
It can make lag on server.
-
First look: You used too many "if" . Try to use "switch".
but working well....
whit not bugs..
It can make lag on server.
whatever i not understand yet the switch xD
-
Lol
Try find switch in gups and learn about it xD
-
LoL spree with dini_set.. nice ._.
-
LoL spree with dini_set.. nice ._.
loool
-
Does "Dini_set" will auto create if file not exist ?