Jump to content
  • 0

pomoc CreateHouse


Guest SpiRinG

Dotaz

potrebujem príkaz /createhouse

Ale aby mi ukladalo do SC/SHouse

Takto

AddHouse(X,Y,Z,328.493988,1480.589966,1084.449951,15,Cena,false);

AddHouse(X,Y,Z,328.493988,1480.589966,1084.449951,15,Cena,false);

Podseba

 

/createhouse [CENA]

prosim o pomoc hľadal som nenašiel som

ak cez skype

skype:matus1987654321

Link to comment
Share on other sites

16 odpovědí na tuto otázku

Recommended Posts

  • 0

udelas si ho , udelas treba (ja pouzivam ZCMD) ---> http://forum.sa-mp.com/showthread.php?t=91354

a pak to mas treba jen jako

COMMAND:shouse(playerid,params[])

{

new float:X,float:Y,float:Z;

GetPlayerPos(playerid,X,Y,Z);

a pote zapis do souboru , nechce se mi to tu vypisovat....

return 1;

}

Link to comment
Share on other sites

  • 0

new File:log = fopen("/ServerLog.txt", io_write); // Open the file

if(log)

{

fwrite(log, "Server started.\r\n"); // Write to the file (\r\n is for a new line)

fclose(log); // Close the file

}

 

 

dam tam toto?

ale ako bude zapis

pls ukaz apson na X

Link to comment
Share on other sites

  • 0

new float:X,float:Y,float:Z;

GetPlayerPos(playerid,X,Y,Z);

new str[128];

new File:a = fopen("AHouse.txt",io_append);

new stra[128];

format(stra,128,"AddHouse(%s,%s,",----(CO DAM SE)--------------);/// ATD X Y Z staci mi lem X

 

fwrite(a,stra);

fclose(a);

Link to comment
Share on other sites

  • 0

COMMAND:shouse(playerid,params[])
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
new File:domy = fopen("houses.txt", io_append);
if(domy)
{
    new str[256];
  		format(str,sizeof(str),"AddHouse(%f,%f,%f,328.493988,1480.589966,1084.449951,15,%d,false);\n",X,Y,Z,params);
	fwrite(domy, str);
	fclose(domy);
}
SendClientMessage(playerid, -1,"Dum uspesne ulozen");
return 1;
}

akorad to nedela nove radky ...

Link to comment
Share on other sites

  • 0

COMMAND:shouse(playerid,params[])
{
  new cena = strval(params);
  new Float:X,Float:Y,Float:Z;
  GetPlayerPos(playerid,X,Y,Z);
  new File:domy = fopen("houses.txt", io_append);
  if(domy)
  {
      new str[256];
        format(str,sizeof(str),"AddHouse(%f,%f,%f,328.493988,1480.589966,1084.449951,15,%d,false);\r\n",X,Y,Z,cena);
     fwrite(domy, str);
     fclose(domy);
  }
  SendClientMessage(playerid, -1,"Dum uspesne ulozen");
  return 1;
}

Myslím že tak by to malo ísť.

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...