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

Tente assim:

#include <a_samp>
#define MAX_ENTRADAS 2

enum iF{
iNome[100],
Float:eX,
Float:eY,
Float:eZ,
FloatX,
FloatY,
FloatZ,
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;
}
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: 1 Guest(s)