Cateva Event Scripts
#8

1. http://forum.sa-mp.com/showthread.ph...highlight=Math Reaction test,by RyDeR` ,dar mai este si Prize Game/Box de cmg4life
2. http://forum.sa-mp.com/showthread.ph...highlight=Math Maths system,by Zezombia(stiam ca e de Leopard...)
3.Faci o functie(desigur si un timer) ,in functie dai un random pana in MaxPlayers si ii pui aluia o culoare,setezi o variabila globala cu id-ul aluia,si la OnPlayerDeath if(playerid==VariabilaTerorisului)GivePlayerMoney( killerid,50);
pawn Code:
new TeroristId;
new bool:StateGame;

//La OnGameModeinit
SetTimer("SelecteazaTerorist",300000,0);//5 minute

//Dupa OnGameModeInit,sau inainte
forward SelecteazaTerorist( );
public SelecteazaTerorist( )
{
    new rand = random( GetMaxPlayers ( ) );
    if(!IsPlayerConnect( rand ) )rand = random( GetMaxPlayers( ) );
    TeroristId = rand;
    StateGame  = true;
    new
        string[ 256 ];
    format( string, 256, "Acum teroristul este %s[ID:%d] , calca'l in picioare!", pName( rand ), rand);
    return SendClientMessageToAll( 0x55ff11ff, string );
    SetPlayerColor(rand,0xff0000ff);
    for(new i; i < MAX_PLAYRES; i++)
    {
        if( IsPlayerConnected( i ) )SetPlayerColor( i, 0x00000047 );
    }
}
//daca nu ai pName in mod
pName(p){
new a[24];
GetPlayerName(p,a,24);
return a;
}
///La OnPlayerDeath
if( playerid == TeroristId && StateGame == true )
{
    GivePlayerMoney( killerid, +100 );
    new
        string[ 256 ];
    format( string, 256, " New:%s[ID:%d] a omorat teroristul %s si a castigat 100$", pName(killerid), killerid, pName( TeroristId ) );
    SendClientMessageToAll( 0x55ff11ff, string );
    StateGame = false;
    TeroristId = 0xFFFF;
    SetTimer( "SelecteazaTerorist", 300000, 0 );//5 minute
}
4.
pawn Code:
//un Timer la OnGameModeInit
SetTimer("VerificaViteza", 4000, 1);
foward VerificaViteza( );
public VerificaViteza( )
{
    for(new i;i<MAX_PLAYERS;i++)
    {
        if(IsPlayerConnected(i) && GetPlayerState(i)==2)
        {
            new speed = GetPlayerSpeed(i,true);
            if(speed> 100 && GetVehicleModel( GetPlayerVehicleID ( i ) ) )
            {
            GivePlayerMoney( i, +10 );
            GameTextForPlayer( i, "~r~Ai ~h~depasit ~h~viteza", 1000,1 );
            }
        }
    }
return true;
}
GetPlayerSpeed(playerid,bool:kmh) // by misco
{
    new Float:Vx,Float:Vy,Float:Vz,Float:rtn;
    if(IsPlayerInAnyVehicle(playerid)) GetVehicleVelocity(GetPlayerVehicleID(playerid),Vx,Vy,Vz); else GetPlayerVelocity(playerid,Vx,Vy,Vz);
    rtn = floatsqroot(floatabs(floatpower(Vx + Vy + Vz,2)));
    return kmh?floatround(rtn * 100 * 1.61):floatround(rtn * 100);
}
Sper sa iti mearga

Va place spamu nu gluma..puteati sa ii dati 2-3 linkuri si gata...
Reply


Messages In This Thread
Cateva Event Scripts - by 28Hermes78 - 27.07.2010, 14:26
Re: Cateva Event Scripts - by [NoV]LaZ - 27.07.2010, 14:34
Re: Cateva Event Scripts - by coconyr - 27.07.2010, 16:26
Re: Cateva Event Scripts - by Dj_maryo1993 - 27.07.2010, 17:57
Re: Cateva Event Scripts - by Zh3r0 - 27.07.2010, 19:45
Re: Cateva Event Scripts - by 28Hermes78 - 27.07.2010, 20:55
Re: Cateva Event Scripts - by Danielo - 30.07.2010, 01:34
Re: Cateva Event Scripts - by Farsek - 30.07.2010, 04:09
Re: Cateva Event Scripts - by 28Hermes78 - 31.07.2010, 11:53
Re: Cateva Event Scripts - by ventilator1 - 17.07.2013, 11:27

Forum Jump:


Users browsing this thread: 2 Guest(s)