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(592, 1966.7438, -2636.7927, 14.4717, 30.0000, -1, -1, 100);
A_Aviao[1] = CreateVehicle(592, 2007.2888, -2633.1421, 14.4717, 30.0000, -1, -1, 100);
A_Aviao[2] = CreateVehicle(592, 2051.5925, -2633.0779, 14.4717, 30.0000, -1, -1, 100);
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
SetPlayerColor(playerid, 0xFFFFFFFF);
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
return 1;
}
500 cйlulas, um desperdнcio. Lembre que o chat tem um limite de 128 caracteres.
A funзгo PlayerToPoint nгo й necessбria. Use GetPlayerDistanceFromPoint
(Wiki), que jб existe no SA-MP.
PHP код:
stock PlayerToPoint(playerid, Float:radi, Float:x, Float:y, Float:z)
{
if(IsPlayerConnected(playerid))
{
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
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;
}