Beiträge von Compton

    Unter stock Loadaccount


    new Float:health; new Float:armour;
    Health & Armour sind ja Floatzahlen (100.0)


    SetPVarFloat(playerid,"Leben",health); SetPVarFloat(playerid,"Schutzweste",armour);
    Hier wird das Health & Armour aus der .ini oder .txt gelesen



    SetPlayerHealth(playerid,health); SetPlayerArmour(playerid,armour);
    Was aus der Spielerdatei gelesen wurde wird gesetzt


    Unter stock Spielerspeichern


    new Float:health; new Float:armour;



    dini_FloatSet(Spielerdatei,"Leben",health); dini_FloatSet(Spielerdatei,"Schutzweste",armour);
    Beim Ausloggen wird die Float Health & Armour gespeichert.


    Ich hoffe das hat euch geholfen da einige Probleme mit Leben & Schutzweste speichern hatten & wenn es geholfen hat bitte Daumen nach oben geben.

    Dort wird er nicht erstellt, schick uns CreateSaveHouse.

    stock CreateSaveHouse(name[],id,price,level,vw,Float:PosX,Float:PosY,Float:PosZ){ new dFile[32],string[200],number = randomEx(1000,9999); new zone[48]; new Year, Month, Day; getdate(Year, Month, Day); GetHouse2DZone(id, zone, 48); format(dFile, 35, House_File, id);
    new INI:File = INI_Open(dFile);
    INI_WriteFloat(File, "EnterX", PosX); INI_WriteFloat(File, "EnterY", PosY); INI_WriteFloat(File, "EnterZ", PosZ); INI_WriteFloat(File, "ExitX", 223.42928466797); INI_WriteFloat(File, "ExitY", 1287.3064941406); INI_WriteFloat(File, "ExitZ", 1082.14); INI_WriteString(File, "HouseName", name); INI_WriteString(File, "Owner", "Apartment"); INI_WriteInt(File, "Price", price); INI_WriteInt(File, "Level", level); INI_WriteInt(File, "Interior", 1); INI_WriteInt(File, "VW", vw); INI_WriteInt(File, "On_Sell", 1); INI_WriteInt(File, "Lock", 0); INI_WriteInt(File, "RentPrice", 100); INI_WriteString(File, "PlayerRent", "Nobody"); INI_WriteInt(File, "Money", 0); INI_WriteInt(File, "Gun1", 0); INI_WriteInt(File, "Gun2", 0); INI_WriteInt(File, "Ammo1", 0); INI_WriteInt(File, "Ammo2", 0); INI_WriteString(File, "LockPass", "1111"); INI_WriteFloat(File, "hCarX", 0); INI_WriteFloat(File, "hCarY", 0); INI_WriteFloat(File, "hCarZ", 0); INI_WriteFloat(File, "hCarA", 0); INI_WriteInt(File, "hCarC1", 0); INI_WriteInt(File, "hCarC2", 0); INI_WriteInt(File, "hCarID", 0); INI_WriteInt(File, "hCarMoney",0); INI_WriteInt(File, "hCarGun1",0); INI_WriteInt(File, "hCarGun2",0); INI_WriteInt(File, "hCarAmmo1", 0); INI_WriteInt(File, "hCarAmmo2", 0); format(string,sizeof(string),"%d",number); INI_WriteString(File, "PhoneNum", string); format(string,sizeof(string),"%s %d",zone,id); INI_WriteString(File, "Address", string); INI_WriteInt(File, "DayEnter", Day); INI_WriteInt(File, "MonthEnter", Month); INI_Close(File);
    House[id][EnterX] = PosX; House[id][EnterY] = PosY; House[id][EnterZ] = PosZ; House[id][ExitX] = 223.42928466797; House[id][ExitY] = 1287.3064941406; House[id][ExitZ] = 1082.14; format(House[id][HouseName],48,"%s",name); format(House[id][Owner],48,"Apartment"); House[id][Price] = price; House[id][Level] = level; House[id][IntID] = 1; House[id][VW] = vw; House[id][On_Sell] = 1; House[id][Lock] = 0; House[id][RentPrice] = 100; format(House[id][Player_Rent],48,"Nobody"); House[id][Money] = 0; House[id][Gun1] = 0; House[id][Gun2] = 0; House[id][Ammo1] = 0; House[id][Ammo2] = 0; format(House[id][LockPass],48,"1111"); House[id][hCarX] = 0; House[id][hCarY] = 0; House[id][hCarZ] = 0; House[id][hCarA] = 0; House[id][hCarC1] = 0; House[id][hCarC2] = 0; House[id][hCarID] = 0; House[id][hCarMoney] = 0; House[id][hCarGun1] = 0; House[id][hCarGun2] = 0; House[id][hCarAmmo1] = 0; House[id][hCarAmmo2] = 0; format(House[id][PhoneNum],5,"%d",number); format(House[id][Address],32,"%s %d",zone,id); House[id][DayEnter] = Day; House[id][MonthEnter] = Month; House[id][PickupU] = CreateDynamicPickup(1273, 23, PosX,PosY,PosZ,-1,-1,-1,100.0); format(string,sizeof(string),"{29CC3F}Owner: "COL_WHITE"Apartment\n{29CC3F}House name: "COL_WHITE"%s\n{29CC3F}Price: "COL_WHITE"%d\n{29CC3F}Level: "COL_WHITE"%d\n{29CC3F}Address: "COL_WHITE"%s %d\n (/buyhouse)",name,price,level,zone,id); House[id][DLabel] = CreateDynamic3DTextLabel(string, 0xFFFFFF, PosX,PosY,PosZ, 100, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 100); House[id][Icon] = CreateDynamicMapIcon(PosX,PosY,PosZ, 31, 0, -1, -1, -1, 100.0);}

    YCMD:chouse(playerid, params[], help){ #pragma unused help if(!IsPlayerAdmin(playerid)) return SCM(playerid, COLOR_RED, "You must be RCON admin"); new Float:Pos[3],string[64],id,name[48],price,level; if(sscanf(params, "is[48]ii",id,name,price,level)) return SCM(playerid, COLOR_RED, "Usage:"COL_WHITE" /chouse [ID] [Name] [Price] [Level]"); if(id >= MAX_HOUSE) return SCM(playerid, COLOR_RED, "EROR: "COL_WHITE"Try again. You have typed the wrong house id."); format(string, sizeof(string), House_File, id); if(fexist(string)) return SCM(playerid, COLOR_RED, "House on that id already exists.!"); GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]); CreateSaveHouse(name,id,price,level,id+1,Pos[0],Pos[1],Pos[2]); SCM(playerid, -1, ""COL_YELLOW"You have Created a house.."); return 1;


    @[PA]Piet_Meier : Meinst du das ?

    Spoiler anzeigen
    error 017: undefined symbol "ConsumingMoney"
    warning 215: expression has no effect
    error 001: expected token: ";", but found "]"
    error 029: invalid expression, assumed zero
    fatal error 107: too many error messages on one line


    Ich habe die Errors (siehe Spoiler).


    Und dort liegt der error :

    Code
    ConsumingMoney[pID] = 1;


    Ok Thx