Liebe SA:MP Community,
ich habe ein Haus System gescriptet, und habe nur Fehler damit.
Wenn ich versuche ein Haus zu erstellen crasht der Server bei meinem
Befehl CreateHaus.
Befehl:
CreateHaus("Niemand",x,y,z,IntInfo[Slot][___posx],IntInfo[Slot][___posy],IntInfo[Slot][___posz],IntInfo[Slot][_interior],preis);
Stock:
stock CreateHaus(Owner[],Float:___X,Float:___Y,Float:___Z,Float:___iX,Float:___iY,Float:___iZ,___Interior,p)
{
new ___ID=GetFreeHausID();
if(___ID==-1) print("Es sind bereits zuviele Häuser erstellt worden | Lösch zu erst eins");
format(Haus[___ID][Besitzer],MAX_PLAYER_NAME,Owner);
Haus[___ID][Gekauft]=false;
Haus[___ID][Abgeschlossen]=true;
Haus[___ID][___Pos][0]=___X;
Haus[___ID][___Pos][1]=___Y;
Haus[___ID][___Pos][2]=___Z;
Haus[___ID][___Pos][3]=___iX;
Haus[___ID][___Pos][4]=___iY;
Haus[___ID][___Pos][5]=___iZ;
Haus[___ID][Int]=___Interior;
Haus[___ID][___Preis]=p;
Haus[___ID][VirtualWorld]=GetFreeInteriorVW(Haus[___ID][Int]);
Haus[___ID][PickupID] = CreatePickup(1273,1,___X,___Y,___Z);
for(new i,j=GetMaxPlayers();i!=j;i++) if(IsPlayerConnected(i)) SetPlayerMapIcon(i,STARTMAPICON+___ID,___X,___Y,___Z,31,0xFFFFFFFF);
new string[55];
format(string,55,"Dieses Haus steht zum Verkauf\n\nPreis: %d $",Haus[___ID][___Preis]);
Haus[___ID][Label] = Create3DTextLabel(string,0x33AA33FF,___X,___Y,___Z,100.0,0,1);
SaveHaus(___ID);
return 1;
}
Mit freundlichen Grüßen,
Phoenix