Jump to content

návod CZ property 100% funkcnost.


Guest ShockyCZE

Recommended Posts

Píše mi to

C:\Documents and Settings\Svoboda\Plocha\Programi\pawno\include\CZproperty.inc(277) : warning 219: local variable "hp" shadows a variable at a preceding level
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.

A CZ PRoperty mam stažený s tohodle topicu

Link to comment
Share on other sites

  • Replies 55
  • Created
  • Last Reply

Top Posters In This Topic

Potřebuju pomoct ...

 

Udělal jsem si ukládání pro nemovitost ...

 

nemovitost[playerid] = dini_Int(file[playerid], "Nemovitosti");

 

a

 

dini_IntSet(file[playerid], "Nemovitosti", nemovitost[playerid]);

 

Ale nevím jestly: nemovitost[playerid] je dobře ...

 

Mužete mě někdo zijistit co tam mám dát místo nemovitost[playerid]? děkuji rEf

Link to comment
Share on other sites

Potřebuju pomoct ...

 

Udělal jsem si ukládání pro nemovitost ...

 

nemovitost[playerid] = dini_Int(file[playerid], "Nemovitosti");

 

a

 

dini_IntSet(file[playerid], "Nemovitosti", nemovitost[playerid]);

 

Ale nevím jestly: nemovitost[playerid] je dobře ...

 

Mužete mě někdo zijistit co tam mám dát místo nemovitost[playerid]? děkuji rEf

Link to comment
Share on other sites

a) načo použivaš new file[MAX_PLAYERS][128]; ?

B) neviem čo chceš ukladať ale podľa mňa chceš ukladať majiteľa... prop_ownername[24]


public AddProperty(Float:static_x,Float:static_y,Float:static_z, cost, payments, const property_name[])
{
if(PropertyCount <= MAX_PROPERTIES)
{
    CreatePickup(1274, 1, static_x, static_y, static_z);
    //-----------------------------------------
    Property[PropertyCount][prop_pos_x] = static_x;
    Property[PropertyCount][prop_pos_y] = static_y;
    Property[PropertyCount][prop_pos_z] = static_z;
    Property[PropertyCount][prop_cost]  = cost;
    Property[PropertyCount][prop_payments] = payments;
    format(Property[PropertyCount][prop_name], MAX_PROPERTY_NAME, "%s", property_name);
    //-----------------------------------------
           if(!fexist("nemovitosti.txt")){
           dini_Crate("nemovitosti.txt");
           new asdasfasdas[50];
           for(new i; i < MAX_PROPERTIES;i++){
           format(asdasfasdas,50,"Nemovitost%d",i);
           dini_Set("nemovitosti.txt",asdasfasdas,"Nikto")
           }}
            new asdd[20];
            format(asdd,10,"Nemovitost%d",PropertyCount);
            format(Property[PropertyCount][prop_ownername],24,"%s",dini_Get("nemovitosti.txt",asdd);

       	    PropertyCount++;
}else{
	print("  __  Kapacita AddProperty prekrocena, nemovitost nebyla vytvorena.  __  ");
}
}

 

a potom do kúpenia daš

new asdfdsaf[20];
format(asdfdsaf,20,"Nemovitost%d",property_in);
dini_Set("nemovitosti.txt",asdfdsaf,Jmeno(playerid));

hardcore

Link to comment
Share on other sites

a) načo použivaš new file[MAX_PLAYERS][128]; ?

B) neviem čo chceš ukladať ale podľa mňa chceš ukladať majiteľa... prop_ownername[24]


public AddProperty(Float:static_x,Float:static_y,Float:static_z, cost, payments, const property_name[])
{
if(PropertyCount <= MAX_PROPERTIES)
{
    CreatePickup(1274, 1, static_x, static_y, static_z);
    //-----------------------------------------
    Property[PropertyCount][prop_pos_x] = static_x;
    Property[PropertyCount][prop_pos_y] = static_y;
    Property[PropertyCount][prop_pos_z] = static_z;
    Property[PropertyCount][prop_cost]  = cost;
    Property[PropertyCount][prop_payments] = payments;
    format(Property[PropertyCount][prop_name], MAX_PROPERTY_NAME, "%s", property_name);
    //-----------------------------------------
           if(!fexist("nemovitosti.txt")){
           dini_Crate("nemovitosti.txt");
           new asdasfasdas[50];
           for(new i; i < MAX_PROPERTIES;i++){
           format(asdasfasdas,50,"Nemovitost%d",i);
           dini_Set("nemovitosti.txt",asdasfasdas,"Nikto")
           }}
            new asdd[20];
            format(asdd,10,"Nemovitost%d",PropertyCount);
            format(Property[PropertyCount][prop_ownername],24,"%s",dini_Get("nemovitosti.txt",asdd);

       	    PropertyCount++;
}else{
	print("  __  Kapacita AddProperty prekrocena, nemovitost nebyla vytvorena.  __  ");
}
}

 

a potom do kúpenia daš

new asdfdsaf[20];
format(asdfdsaf,20,"Nemovitost%d",property_in);
dini_Set("nemovitosti.txt",asdfdsaf,Jmeno(playerid));

hardcore

Link to comment
Share on other sites

  • 1 month later...

Pardon že píšu do starého topicu ale Qwer máš tam překlik, místo dini_Crate("nemovitosti.txt"); tam má být dini_Create("nemovitosti.txt");

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...