//enter befehl fürs gebäude
ocmd:enter(playerid,params[])
{
for(new i=0; i<sizeof(bInfo); i++)
{
if(!IsPlayerInRangeOfPoint(playerid,2,bInfo[i][b_x],bInfo[i][b_y],bInfo[i][b_z]))continue;
SetPlayerPos(playerid,bInfo[i][b_ix],bInfo[i][b_iy],bInfo[i][b_iz]);
SetPlayerInterior(playerid,bInfo[i][b_interior]);
SetPlayerVirtualWorld(playerid,i);
SetPlayerShopName(playerid,bInfo[i][b_shopname]);
return 1;
}
for(new i=0; i<sizeof(hInfo); i++)
{
if(!hInfo[i][h_id])continue;
if(hInfo[i][ih_x]==0.0)continue;
if(!strlen(hInfo[i][h_besitzer]))continue;
if(!isplayermieter(playerid))continue;
if(strcmp(hInfo[i][h_besitzer],getPlayerName(playerid),true) && strcmp(hInfo[i][h_mieter],getPlayerName(playerid),true) && strcmp(hInfo[i][h_mieter2],getPlayerName(playerid),true))continue;
if(!IsPlayerInRangeOfPoint(playerid,2,hInfo[i][h_x],hInfo[i][h_y],hInfo[i][h_z]))continue;
SetPlayerPos(playerid,hInfo[i][ih_x],hInfo[i][ih_y],hInfo[i][ih_z]);
SetPlayerInterior(playerid,hInfo[i][h_interior]);
SetPlayerVirtualWorld(playerid,i);
return 1;
}
return 1;
}
Ich spawne im haus bei spawnchange, ich kann auch mit N rausgehen aber am icon komme ich nicht rein...