Hey,
komischerweise werden bei mir die Gebäuden und Mapmarker nicht geladen(?)
´
Code
enum intInfo{
b_name[128],
Float:b_x,
Float:b_y,
Float:b_z,
Float:b_a,
Float:b_ix,
Float:b_iy,
Float:b_iz,
Float:b_ia,
b_interior,
intmapmarker
}
new bInfo[][intInfo] = {
{"Stadthalle",481.0609,-1771.0409,18.7958, 352.6132,389.8470, 173.7643, 1008.3828, 89.3840,3,38}
};
Alles anzeigen
Code
OnGameModeInit:
//INT Laden
for(new i=0;i<sizeof(bInfo);i++)
{
new string[250],string2[250];
CreatePickup(1318,1,bInfo[i][b_x],bInfo[i][b_y],bInfo[i][b_z],-1);
CreatePickup(1318,1,bInfo[i][b_ix],bInfo[i][b_iy],bInfo[i][b_iz],-1);
format(string,sizeof(string),"%s Eingang u zu interagieren\nbenutze die Eingabetaste",bInfo[i][b_name]);
Create3DTextLabel(string,COLOR_WHITE,bInfo[i][b_x],bInfo[i][b_y],bInfo[i][b_z],40,0,1);
format(string2,sizeof(string2),"%s Ausgang um zu interagieren\nbenutze die Eingabetaste",bInfo[i][b_name]);
Create3DTextLabel(string,COLOR_WHITE,bInfo[i][b_ix],bInfo[i][b_iy],bInfo[i][b_iz],40,i,1);
CreateDynamicMapIcon(bInfo[i][b_x],bInfo[i][b_y],bInfo[i][b_z],bInfo[i][intmapmarker],-1,-1,-1,-1,-1,MAPICON_LOCAL);
}
Alles anzeigen
Code
//Interrior
if(newkeys & KEY_SECONDARY_ATTACK)
{
if(enterexit[playerid]!=0)return 1;
for(new i=0;i<sizeof(bInfo);i++)
{
if(IsPlayerInRangeOfPoint(playerid,2,bInfo[i][b_x],bInfo[i][b_y],bInfo[i][b_z]))
{
SetPlayerPos(playerid,bInfo[i][b_ix],bInfo[i][b_iy],bInfo[i][b_iz]);
SetPlayerVirtualWorld(playerid,bInfo[i][b_interior]);
SetPlayerVirtualWorld(playerid,i);
SetPlayerFacingAngle(playerid,bInfo[i][b_ia]);
enterexit[playerid]=2;
return 1;
}
if(IsPlayerInRangeOfPoint(playerid,2,bInfo[i][b_ix],bInfo[i][b_iy],bInfo[i][b_iz]))
{
if(GetPlayerVirtualWorld(playerid)!=i)continue;
SetPlayerPos(playerid,bInfo[i][b_x],bInfo[i][b_y],bInfo[i][b_z]);
SetPlayerVirtualWorld(playerid,0);
SetPlayerVirtualWorld(playerid,0);
SetPlayerFacingAngle(playerid,bInfo[i][b_a]);
enterexit[playerid]=2;
return 1;
}
}
}
Alles anzeigen