[FilterScript] Profissгo Piloto
#5

Desperdнcio de cйlulas... tem menos de 200 ai..
PHP код:
new StringCat[700];
strcat(StringCat"{FFFFFF}30 Passageiros LV{D2691E}» {00FF00}R$1500\n");
strcat(StringCat"{FFFFFF}50 Passageiros SF{D2D61E}» {00FF00}R$1500\n"); 
Isso:
PHP код:
new A_Aviao[3];
new 
Prof[MAX_PLAYERS][pProf];
new 
carregado[MAX_PLAYERS] = 0
Seria melhor assim:
PHP код:
static A_Aviao[3],
Prof[MAX_PLAYERS][pProf],
carregado[MAX_PLAYERS] = 0
Nгo vejo por que usar um enumerador para 1 coisa...
PHP код:
enum pProf
{
    
Profissao

Tem ideia do que estб fazendo? Os aviхes vгo ser criados toda vez que alguйm entrar no servidor. Faзa isso em OnFilterScriptInit, e remova os aviхes em OnFilterScriptExit.
PHP код:
public OnPlayerConnect(playerid)
{
    
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
    
A_Aviao[0] = CreateVehicle(5921966.7438, -2636.792714.471730.0000, -1, -1100);
    
A_Aviao[1] = CreateVehicle(5922007.2888, -2633.142114.471730.0000, -1, -1100);
    
A_Aviao[2] = CreateVehicle(5922051.5925, -2633.077914.471730.0000, -1, -1100);
    
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
    
SetPlayerColor(playerid0xFFFFFFFF);
    
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
    
return 1;

500 cйlulas, um desperdнcio. Lembre que o chat tem um limite de 128 caracteres.
PHP код:
string[500]; 
A funзгo PlayerToPoint nгo й necessбria. Use GetPlayerDistanceFromPoint (Wiki), que jб existe no SA-MP.
PHP код:
stock PlayerToPoint(playeridFloat:radiFloat:xFloat:yFloat:z)
{
    if(
IsPlayerConnected(playerid))
    {
        new 
Float:oldposxFloat:oldposyFloat:oldposz;
        new 
Float:tempposxFloat:tempposyFloat:tempposz;
        
GetPlayerPos(playeridoldposxoldposyoldposz);
        
tempposx = (oldposx -x);
        
tempposy = (oldposy -y);
        
tempposz = (oldposz -z);
        if (((
tempposx radi) && (tempposx > -radi)) && ((tempposy radi) && (tempposy > -radi)) && ((tempposz radi) && (tempposz > -radi)))
        {
            return 
1;
        }
    }
    return 
0;

Reply


Messages In This Thread
Profissгo Piloto - by SmokiieGamer - 05.03.2017, 13:58
Re: Profissгo Piloto - by didimk157 - 05.03.2017, 14:30
Re: Profissгo Piloto - by SmokiieGamer - 05.03.2017, 16:09
Respuesta: Profissгo Piloto - by NobiZinhoBR - 05.03.2017, 21:05
Re: Profissгo Piloto - by Jelly23 - 05.03.2017, 21:40
Re: Profissгo Piloto - by Luiiiz - 06.03.2017, 01:23
Re: Profissгo Piloto - by Jelly23 - 06.03.2017, 01:31
Re: Profissгo Piloto - by LockedLucas - 06.03.2017, 15:11

Forum Jump:


Users browsing this thread: 1 Guest(s)