[Ajuda] Blindagem.
#7

Quote:
Originally Posted by Equipe
Посмотреть сообщение
Poste o Codigo, ...
PHP код:
/*
------------------------------------------------------------------------------------------------------------------------------------------------------------------
            ZZZZZZZZZZZ   ZZZZ    ZZZZ                   ZZZZZZZZZZZZ   ZZZZ   ZZZZ       ZZZZZZ       ZZZZZZZZZZZZ
            ZZZZZZZZZZZ   ZZZZ    ZZZZ                   ZZZZZZZZZZZZ   ZZZZ   ZZZZ     ZZZZZZZZZZ     ZZZZZZZZZZZZ
            ZZZZ    ZZZ   ZZZZ    ZZZZ                           ZZZZ   ZZZZ   ZZZZ   ZZZZ      ZZZZ           ZZZZ
            ZZZZZZZZZZZZZ  ZZZZZZZZZ                           ZZZZ     ZZZZ   ZZZZ   ZZZZ      ZZZZ         ZZZZ
            ZZZZZZZZZZZZZ     ZZZZ                           ZZZZ       ZZZZ   ZZZZ   ZZZZ      ZZZZ       ZZZZ
            ZZZZ     ZZZZ     ZZZZ                         ZZZZ                       ZZZZ   || ZZZZ     ZZZZ
            ZZZZ     ZZZZ     ZZZZ                       ZZZZZZZZZZZZ   ZZZZ   ZZZZ     ZZZZZZ||ZZ     ZZZZZZZZZZZZ
            ZZZZZZZZZZZZZ     ZZZZ                       ZZZZZZZZZZZZ   ZZZZ   ZZZZ       ZZZZZ||      ZZZZZZZZZZZZ
                                                                                                ||
                                           _____________________________________________________________________________________________
                                          |                                                                                             |
                                          |            Bom galera aqui й o ziiQz do fуrum sa-mp ,                                          |
                                          |        peзo a vocкs que nгo retirem os crйditos , e se vocк for usar                           |
                                          |        em seu servidor , peзo que deixe os crйditos sobre o sistema por favor :c               |
                                          |        fazendo isso vocк estarб se diferenciando dos outros caras, mantendo os crйditos        |
                                          |        do criador , e ganhando moral por ser humilde *-*' , enfim , por favor ,                  |
                                          |        mantenham crйditos , pois assim eu terei motivaзгo para criar mais sistemas e postar :3.|                   |
                                          |_____________________________________________________________________________________________|
------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
                                        //==============================================//
                                        //================= Includes ===================//
                                        //==============================================//
#include        a_samp
#include        zcmd
                                        //==============================================//
                                        //==================== New's ===================//
                                        //==============================================//
#define        NUMERO_CARROS       773 //altere conforme a quantidade existente em seu gamemode.
                                        //==============================================//
                                        //==================== New's ===================//
                                        //==============================================//
new blindziiQz[MAX_VEHICLES];
new 
blindadinho[MAX_PLAYERS] = 0;
new 
string[128];
                                        
//==============================================//
                                        //=================== Publics ==================//
                                        //==============================================//
public OnFilterScriptInit()
{
    
SetTimer("comprarblinddenovo"60000true);
    
SetTimer("ziiQzblind"500true);
    
AddStaticVehicleEx(427,1595.3212,-1710.3961,5.6112,359.7906,1,0,1);
    return 
1;
}
public 
OnFilterScriptExit()
{
    return 
1;
}
public 
OnVehicleDeath(vehicleidkillerid)
{
    
blindziiQz[GetPlayerVehicleID(vehicleid)] = 0;
    return 
1;
}
public 
OnPlayerCommandPerformed(playeridcmdtext[], success)
{
    if(!
success)
    {
        
format(stringsizeof(string), "[ATENЗГO] {FFFFFF}O comando {FF0000}%s {FFFFFF}й invбlido."cmdtext);
        return 
SendClientMessage(playerid0xFF0000FFstring);
    }
    return 
1;
}
forward ziiQzblind(vehicleidplayerid);
public 
ziiQzblind(vehicleidplayerid)
{
    for(new 
car 1car <= NUMERO_CARROScar++)
    {
        if(
blindziiQz[car] > 0)
        {
            new 
Float:health;
            
GetVehicleHealth(carhealth);
            if(
health 999)
            {
                
blindziiQz[car] -= 5;
                
RepairVehicle(car);
                return 
0;
            }
        }
    }
    return 
1;
}
forward comprarblinddenovo(playerid);
public 
comprarblinddenovo(playerid)
{
     
SendClientMessage(playerid0xFFFFFFFF"Vocк jб pode comprar uma blindagem novamente.");
      
blindadinho[playerid] = 0;
      return 
1;
}
                                        
//==============================================//
                                        //================== Comandos ==================//
                                        //==============================================//
CMD:ajudablindagem(playerid)
{
    
SendClientMessage(playerid0x1FF905FF"•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•");
    
SendClientMessage(playerid0xFFFFFFFF"Para comprar uma blindagem й fбcil, /blindar.");
    
SendClientMessage(playerid0xFFFFFFFF"Para checar sua blindagem use, /minhablindagem.");
    
SendClientMessage(playerid0xFFFFFFFF"Vocк sу poderб comprar blindagem novamente,");
    
SendClientMessage(playerid0xFFFFFFFF"quando a sua antiga acabar, obrigado.");
    
SendClientMessage(playerid0x1FF905FF"•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•");
    return 
1;
}
CMD:blindar(playerid)
    if(!
IsPlayerInAnyVehicle(playerid))return SendClientMessage(playerid0xFFFFFFFF"Para vocк comprar uma blindagem , vocк precisa estar em um carro.");
    if(
GetPlayerMoney(playerid) < 35000)return SendClientMessage(playerid0xFFFFFFFF"Vocк nгo tem esse dinheiro todo.");
    if(
blindadinho[playerid] == 1)return SendClientMessage(playerid0xFFFFFFFF"Vocк jб estб blindado.");
    new 
idcarro GetPlayerVehicleID(playerid);
    
blindadinho[playerid] = 1;
    
GivePlayerMoney(playerid, -35000);
    
blindziiQz[GetPlayerVehicleID(playerid)] = 100;
    
RepairVehicle(GetPlayerVehicleID(playerid));
    
ziiQzblind(idcarroplayerid);
    
SendClientMessage(playerid0xFFFFFFFF"Vocк comprou uma Blindagem por {00FF00}35.000${FFFFFF}.");
      return 
1;
}
CMD:minhablindagem(playeridparams[])
{
    if(!
IsPlayerInAnyVehicle(playerid))return SendClientMessage(playerid0xFFFFFFFF"Para checar sua blindagem , vocк precisa estar em seu carro blindado.");
    new 
s[100];
    
format(s100"Seu veнculo ainda possui [{FF0000}%i%{FFFFFF}] de blindagem."blindziiQz[GetPlayerVehicleID(playerid)]);
    
SendClientMessage(playerid0xFFFFFFFFs);
    return 
1;

Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)