[Ajuda] Duvida: O que hб de errado nesse cуdigo?
#3

Ola , vou dar uma sugestгo .
Acaba ficando mais limpo no meu ponto de vista , vlw jovem .


Quote:
Originally Posted by Don_Speed
View Post
Deste modo de pensar da para facilitar a vida em varios pontos .

+1 Ex:
PHP Code:
enum iF{
     
iNome[100],
     
Float:eX,
     
Float:eY,
     
Float:eZ,
     
Float:sX,
     
Float:sY,
     
Float:sZ,
     
Interior
}
new 
EntradaInfo[MAX_ENTRADAS][iF] = {
{
"Teste"0.00.00.00.00.00.00},
{
"Teste"0.00.00.00.00.00.00}
};
CallBacK::OnGameModeInit[]
{
    new 
StringS[300];
    for(new 
inf 0infMAX_ENTRADASinf++)
    {
        
format(StringSsizeof StringS"{FFFFFF}[{6495ED}%s{FFFFFF}]\nAperte 'F' para entrar"EntradaInfo[inf][iNome]);
        
Create3DTextLabel(StringS, -1EntradaInfo[inf][eX],EntradaInfo[inf][eY],EntradaInfo[inf][eZ], 15.000);
        
        
CreatePickup(12391EntradaInfo[inf][eX],EntradaInfo[inf][eY],EntradaInfo[inf][eZ],-1);
        
CreatePickup(12391EntradaInfo[inf][sX],EntradaInfo[inf][sY],EntradaInfo[inf][sZ],-1);
        
        
format(StringSsizeof StringS"{FFFFFF}[{6495ED}%s{FFFFFF}]\nAperte 'F' para saida"EntradaInfo[inf][iNome]);
        
Create3DTextLabel(StringS, -1EntradaInfo[inf][sX],EntradaInfo[inf][sY],EntradaInfo[inf][sZ], 15.000);
    }
    return 
true;
}
CallBacK::OnPlayerKeyStateChange[playeridnewkeysoldkeys]
{
    if(
newkeys == KEY_SECONDARY_ATTACK)
    {
        for(new 
inf 0infMAX_ENTRADASinf++)
        {
               if(
IsPlayerInRangeOfPoint(playerid2.0EntradaInfo[inf][eX],EntradaInfo[inf][eY],EntradaInfo[inf][eZ]))
                    return 
SetPlayerPos(playeridEntradaInfo[inf][sX],EntradaInfo[inf][sY],EntradaInfo[inf][sZ]), SetPlayerInterior(playeridEntradaInfo[inf][Interior]);
               if(
IsPlayerInRangeOfPoint(playerid2.0EntradaInfo[inf][sX],EntradaInfo[inf][sY],EntradaInfo[inf][sZ]))
                    return 
SetPlayerPos(playeridEntradaInfo[inf][eX],EntradaInfo[inf][eY],EntradaInfo[inf][eZ]), SetPlayerInterior(playeridEntradaInfo[inf][Interior]);
        }
    }
    return 
true;

Reply


Messages In This Thread
Duvida: O que hб de errado nesse cуdigo? - by Ryuzaki07 - 05.03.2019, 17:11
Re: Duvida: O que hб de errado nesse cуdigo? - by ipsLuan - 05.03.2019, 17:52
Re: Duvida: O que hб de errado nesse cуdigo? - by Don_Speed - 05.03.2019, 18:59
Re: Duvida: O que hб de errado nesse cуdigo? - by Ryuzaki07 - 05.03.2019, 19:10
Re: Duvida: O que hб de errado nesse cуdigo? - by Ryuzaki07 - 05.03.2019, 19:15
Re: Duvida: O que hб de errado nesse cуdigo? - by ChavesS - 05.03.2019, 19:50
Re: Duvida: O que hб de errado nesse cуdigo? - by Ryuzaki07 - 05.03.2019, 20:08
Re: Duvida: O que hб de errado nesse cуdigo? - by Don_Speed - 06.03.2019, 08:24

Forum Jump:


Users browsing this thread: 2 Guest(s)