05.03.2019, 19:15
Quote:
Ola , vou dar uma sugestгo .
Acaba ficando mais limpo no meu ponto de vista , vlw jovem . |
Pelo que entendi, era pra ficar assim nгo era?
PHP Code:
#include <a_samp>
enum iF{
iNome[100],
Float:eX,
Float:eY,
Float:eZ,
Float:sX,
Float:sY,
Float:sZ,
Interior
}
new EntradaInfo[MAX_ENTRADAS][iF] = {
{"Delegacia", 1555.1055, -1675.6426, 16.1953, 246.7995,65.9249,1003.6406, 6},
{"Delegacia Dillimore", 627.9832,-571.7913,17.4442, 246.7995,65.9249,1003.6406, 6}
};
public OnGameModeInit()
{
new StringS[300];
for(new inf = 0; inf< MAX_ENTRADAS; inf++)
{
format(StringS, sizeof StringS, "{FFFFFF}[{6495ED}%s{FFFFFF}]\nAperte 'F' para entrar", EntradaInfo[inf][iNome]);
Create3DTextLabel(StringS, -1, EntradaInfo[inf][eX],EntradaInfo[inf][eY],EntradaInfo[inf][eZ], 15.0, 0, 0);
CreatePickup(1239, 1, EntradaInfo[inf][eX],EntradaInfo[inf][eY],EntradaInfo[inf][eZ],-1);
CreatePickup(1239, 1, EntradaInfo[inf][sX],EntradaInfo[inf][sY],EntradaInfo[inf][sZ],-1);
format(StringS, sizeof StringS, "{FFFFFF}[{6495ED}%s{FFFFFF}]\nAperte 'F' para saida", EntradaInfo[inf][iNome]);
Create3DTextLabel(StringS, -1, EntradaInfo[inf][sX],EntradaInfo[inf][sY],EntradaInfo[inf][sZ], 15.0, 0, 0);
}
return true;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys == KEY_SECONDARY_ATTACK)
{
for(new inf = 0; inf< MAX_ENTRADAS; inf++)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, EntradaInfo[inf][eX],EntradaInfo[inf][eY],EntradaInfo[inf][eZ]))
return SetPlayerPos(playerid, EntradaInfo[inf][sX],EntradaInfo[inf][sY],EntradaInfo[inf][sZ]), SetPlayerInterior(playerid, EntradaInfo[inf][Interior]);
if(IsPlayerInRangeOfPoint(playerid, 2.0, EntradaInfo[inf][sX],EntradaInfo[inf][sY],EntradaInfo[inf][sZ]))
return SetPlayerPos(playerid, EntradaInfo[inf][eX],EntradaInfo[inf][eY],EntradaInfo[inf][eZ]), SetPlayerInterior(playerid, EntradaInfo[inf][Interior]);
}
}
return true;
}
E:\UnderWorld\gamemodes\funfo.pwn(13) : error 017: undefined symbol "MAX_ENTRADAS"
E:\UnderWorld\gamemodes\funfo.pwn(21) : error 017: undefined symbol "MAX_ENTRADAS"
E:\UnderWorld\gamemodes\funfo.pwn(3 : error 017: undefined symbol "MAX_ENTRADAS"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Errors.