SA-MP Forums Archive
[Ajuda] 2 Duvidas bбsicas *.* - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] 2 Duvidas bбsicas *.* (/showthread.php?tid=595310)



2 Duvidas bбsicas *.* - Fodastiico - 01.12.2015

Bom galera,estou com duas pequenas duvidas, queria saber como coloco MapIcons nesse sistema de casa,e como crio um comando /CriarCasa para nгo ter trabalho de ficar pegando cordenadas pra criar casas no gm! Agradeзo a quem me ajudar.

Код:
AddHouse(houseid, Float:iconX, Float:iconY, Float:iconZ, Float:interiorX, Float:interiorY, Float:interiorZ, Costa, Sella, Interiora, virtualworld)
{
new house[128];
format(house, sizeof(house), "Casas/Casaid%d",houseid);
if(!dini_Exists(house))
{
dini_Create(house);
format(hInfo[houseid][aName], 24, "Ninguem");
dini_Set(house, "Name", "Ninguem");
format(hInfo[houseid][Renter], 24, "Ninguem");
dini_Set(house, "Renter", "Ninguem");
format(hInfo[houseid][Des], 80, "Nada");
dini_Set(house, "Des", "Nada");
format(hInfo[houseid][mensagemv], 100, "sem nome");
dini_Set(house, "mensagemv", "sem nome");
format(hInfo[houseid][Login], 80, "00/00/0000");
dini_Set(house, "Login", "00/00/0000");
hInfo[houseid][Rentable] = 0;
dini_IntSet(house, "Rentable", 0);
hInfo[houseid][Rentcost] = 0;
dini_IntSet(house, "TemDono", 0);
dini_IntSet(house, "Rentcost", 0);
hInfo[houseid][Cost] = Costa;
dini_IntSet(house, "Cost", Costa);
hInfo[houseid][Sell] = Sella;
dini_IntSet(house, "Sell", Sella);
dini_IntSet(house, "Casaid", houseid);
hInfo[houseid][Casaid] = houseid;
hInfo[houseid][Interior] = Interiora;
dini_IntSet(house, "Interior", Interiora);
dini_IntSet(house, "Virtualworld", virtualworld);
hInfo[houseid][Virtualworld] = virtualworld;
hInfo[houseid][Locked] = 0;
dini_IntSet(house, "Locked", 0);
hInfo[houseid][SemInt] = 0;
dini_IntSet(house, "SemInt", 0);
hInfo[houseid][liberado] = 0;
dini_IntSet(house, "liberado", 0);
hInfo[houseid][alarme] = 0;
dini_IntSet(house, "alarme", 0);
hInfo[houseid][Carrof] = 0;
dini_IntSet(house, "Carrof", 0);
hInfo[houseid][InteriorX] = interiorX;
hInfo[houseid][InteriorY] = interiorY;
hInfo[houseid][InteriorZ] = interiorZ;
dini_FloatSet(house, "X", interiorX);
dini_FloatSet(house, "Y", interiorY);
dini_FloatSet(house, "Z", interiorZ);
dini_IntSet(house, "RentPay", 0);
dini_IntSet(house, "RentGet", 0);
cInfo[houseid][HouseCar] = 509;
dini_IntSet(house, "HouseCar", 0);
cInfo[houseid][CarModel] = 509;
dini_IntSet(house, "CarModel", 0);
cInfo[houseid][VelX] = 0;
cInfo[houseid][VelY] = 0;
cInfo[houseid][VelZ] = 0;
cInfo[houseid][AnglE] = 0;
dini_FloatSet(house, "CarX", 0);
dini_FloatSet(house, "CarY", 0);
dini_FloatSet(house, "CarZ", 0);
dini_FloatSet(house, "Angle", 0);
cInfo[houseid][CarColor1] = 0;
cInfo[houseid][CarColor2] = 0;
dini_IntSet(house, "CarColor1", 0);
dini_IntSet(house, "CarColor2", 0);
cInfo[houseid][GotCar] = 0;
}
else
{
format(hInfo[houseid][aName], 24, dini_Get(house, "Name"));
format(hInfo[houseid][Renter], 24, dini_Get(house, "Renter"));
format(hInfo[houseid][Des], 80, dini_Get(house, "Des"));
format(hInfo[houseid][Des], 80, dini_Get(house, "Des"));
format(hInfo[houseid][Login], 80, dini_Get(house, "Login"));
hInfo[houseid][Rentable] = dini_Int(house, "Rentable");
hInfo[houseid][TemDono] = dini_Int(house, "TemDono");
hInfo[houseid][Rentcost] = dini_Int(house, "Rentcost");
hInfo[houseid][Cost] = dini_Int(house, "Cost");
hInfo[houseid][Sell] = dini_Int(house, "Sell");
hInfo[houseid][Casaid] = dini_Int(house, "Casaid");
hInfo[houseid][Interior] = dini_Int(house, "Interior");
hInfo[houseid][Locked] = dini_Int(house, "Locked");
hInfo[houseid][SemInt] = dini_Int(house, "SemInt");
hInfo[houseid][liberado] = dini_Int(house, "liberado");
hInfo[houseid][alarme] = dini_Int(house, "alarme");
hInfo[houseid][Carrof] = dini_Int(house, "Carrof");
hInfo[houseid][InteriorX] = dini_Float(house, "X");
hInfo[houseid][InteriorY] = dini_Float(house, "Y");
hInfo[houseid][InteriorZ] = dini_Float(house, "Z");
hInfo[houseid][Virtualworld] = dini_Int(house, "Virtualworld");
}
hInfo[houseid][iconx]=iconX;
hInfo[houseid][icony]=iconY;
hInfo[houseid][iconz]=iconZ;
new string[128];
format(house, sizeof(house), "Casas/Casaid%d",houseid);
if(dini_Int(house, "TemDono") == 0)
{
HousePickup[houseid] = CreatePickup(1273, 23, iconX, iconY, iconZ);
format(string, sizeof(string), "Casa %d", dini_Int(house, "Casaid"));
Create3DTextLabel(string, 0xFFFFFFAA, iconX, iconY, iconZ+0.80, 20.0, 0, 1);
}
else if(dini_Int(house, "TemDono") == 1)
{
HousePickup[houseid] = CreatePickup(1272, 23, iconX, iconY, iconZ);
format(string, sizeof(string), "Casa %d", dini_Int(house, "Casaid"));
Create3DTextLabel(string, 0xFFFFFFAA, iconX, iconY, iconZ+0.80, 20.0, 0,1);
}
}



Re: 2 Duvidas bбsicas *.* - LockedLucas - 01.12.2015

Aqui o cуdigo pra criar os нcones das casas.

PHP код:
AddHouse(houseidFloat:iconXFloat:iconYFloat:iconZFloat:interiorXFloat:interiorYFloat:interiorZCostaSellaInterioravirtualworld)
{
new 
house[128];
format(housesizeof(house), "Casas/Casaid%d",houseid);
if(!
dini_Exists(house))
{
dini_Create(house);
format(hInfo[houseid][aName], 24"Ninguem");
dini_Set(house"Name""Ninguem");
format(hInfo[houseid][Renter], 24"Ninguem");
dini_Set(house"Renter""Ninguem");
format(hInfo[houseid][Des], 80"Nada");
dini_Set(house"Des""Nada");
format(hInfo[houseid][mensagemv], 100"sem nome");
dini_Set(house"mensagemv""sem nome");
format(hInfo[houseid][Login], 80"00/00/0000");
dini_Set(house"Login""00/00/0000");
hInfo[houseid][Rentable] = 0;
dini_IntSet(house"Rentable"0);
hInfo[houseid][Rentcost] = 0;
dini_IntSet(house"TemDono"0);
dini_IntSet(house"Rentcost"0);
hInfo[houseid][Cost] = Costa;
dini_IntSet(house"Cost"Costa);
hInfo[houseid][Sell] = Sella;
dini_IntSet(house"Sell"Sella);
dini_IntSet(house"Casaid"houseid);
hInfo[houseid][Casaid] = houseid;
hInfo[houseid][Interior] = Interiora;
dini_IntSet(house"Interior"Interiora);
dini_IntSet(house"Virtualworld"virtualworld);
hInfo[houseid][Virtualworld] = virtualworld;
hInfo[houseid][Locked] = 0;
dini_IntSet(house"Locked"0);
hInfo[houseid][SemInt] = 0;
dini_IntSet(house"SemInt"0);
hInfo[houseid][liberado] = 0;
dini_IntSet(house"liberado"0);
hInfo[houseid][alarme] = 0;
dini_IntSet(house"alarme"0);
hInfo[houseid][Carrof] = 0;
dini_IntSet(house"Carrof"0);
hInfo[houseid][InteriorX] = interiorX;
hInfo[houseid][InteriorY] = interiorY;
hInfo[houseid][InteriorZ] = interiorZ;
dini_FloatSet(house"X"interiorX);
dini_FloatSet(house"Y"interiorY);
dini_FloatSet(house"Z"interiorZ);
dini_IntSet(house"RentPay"0);
dini_IntSet(house"RentGet"0);
cInfo[houseid][HouseCar] = 509;
dini_IntSet(house"HouseCar"0);
cInfo[houseid][CarModel] = 509;
dini_IntSet(house"CarModel"0);
cInfo[houseid][VelX] = 0;
cInfo[houseid][VelY] = 0;
cInfo[houseid][VelZ] = 0;
cInfo[houseid][AnglE] = 0;
dini_FloatSet(house"CarX"0);
dini_FloatSet(house"CarY"0);
dini_FloatSet(house"CarZ"0);
dini_FloatSet(house"Angle"0);
cInfo[houseid][CarColor1] = 0;
cInfo[houseid][CarColor2] = 0;
dini_IntSet(house"CarColor1"0);
dini_IntSet(house"CarColor2"0);
cInfo[houseid][GotCar] = 0;
}
else
{
format(hInfo[houseid][aName], 24dini_Get(house"Name"));
format(hInfo[houseid][Renter], 24dini_Get(house"Renter"));
format(hInfo[houseid][Des], 80dini_Get(house"Des"));
format(hInfo[houseid][Des], 80dini_Get(house"Des"));
format(hInfo[houseid][Login], 80dini_Get(house"Login"));
hInfo[houseid][Rentable] = dini_Int(house"Rentable");
hInfo[houseid][TemDono] = dini_Int(house"TemDono");
hInfo[houseid][Rentcost] = dini_Int(house"Rentcost");
hInfo[houseid][Cost] = dini_Int(house"Cost");
hInfo[houseid][Sell] = dini_Int(house"Sell");
hInfo[houseid][Casaid] = dini_Int(house"Casaid");
hInfo[houseid][Interior] = dini_Int(house"Interior");
hInfo[houseid][Locked] = dini_Int(house"Locked");
hInfo[houseid][SemInt] = dini_Int(house"SemInt");
hInfo[houseid][liberado] = dini_Int(house"liberado");
hInfo[houseid][alarme] = dini_Int(house"alarme");
hInfo[houseid][Carrof] = dini_Int(house"Carrof");
hInfo[houseid][InteriorX] = dini_Float(house"X");
hInfo[houseid][InteriorY] = dini_Float(house"Y");
hInfo[houseid][InteriorZ] = dini_Float(house"Z");
hInfo[houseid][Virtualworld] = dini_Int(house"Virtualworld");
}
hInfo[houseid][iconx]=iconX;
hInfo[houseid][icony]=iconY;
hInfo[houseid][iconz]=iconZ;
new 
string[128];
format(housesizeof(house), "Casas/Casaid%d",houseid);
if(
dini_Int(house"TemDono") == 0)
{
HousePickup[houseid] = CreatePickup(127323iconXiconYiconZ);
housemapicon[houseid] = CreateDynamicMapIcon(iconXiconYiconZ31, -1, -1, -1, -1100.0);
format(stringsizeof(string), "Casa %d"dini_Int(house"Casaid"));
Create3DTextLabel(string0xFFFFFFAAiconXiconYiconZ+0.8020.001);
}
else if(
dini_Int(house"TemDono") == 1)
{
HousePickup[houseid] = CreatePickup(127223iconXiconYiconZ);
housemapicon[houseid] = CreateDynamicMapIcon(iconXiconYiconZ32, -1, -1, -1, -1115.0);
format(stringsizeof(string), "Casa %d"dini_Int(house"Casaid"));
Create3DTextLabel(string0xFFFFFFAAiconXiconYiconZ+0.8020.00,1);
}




Re: 2 Duvidas bбsicas *.* - Fodastiico - 01.12.2015

Vlw, +REP Nгo e sendo "PIDГO" nгo mas, pode me me ajudar agora a criar o comando /CriarCasa ? sу me fala como cria


Re: 2 Duvidas bбsicas *.* - LockedLucas - 01.12.2015

Eu mexi bem pouco nessa gm entгo nгo sei direito, e te aconselho a nгo editar ela, nгo vale a pena...


Re: 2 Duvidas bбsicas *.* - Fodastiico - 02.12.2015

Entendi, vc sabe alguma GM boa para mecher? GM que dк futuro kk


Re: 2 Duvidas bбsicas *.* - Jauro - 02.12.2015

Quote:

Entendi, vc sabe alguma GM boa para mecher? GM que dк futuro kk

@Off

Desculpe-me intrometer-me, mas
Se vocк quer uma GM que dк futuro
Crie-a vocк mesmo...
Na minha opiniгo, quem pega uma GM jб feita nгo й criador de nada, й editor.
E mexer й com 'x', nгo com 'ch'. (Mexer)


Re: 2 Duvidas bбsicas *.* - LockedLucas - 02.12.2015

O Jauro tem razгo, pra ter sucesso e bom vocк criar algo do 0 com suas prуprias ideias, e nгo pegar uma gm jб feita e sу editar ela assim й difнcil vocк ter sucesso, apesar de que jб vi servidores com essa gm ai e tendo um alguns players na base de 30 + -....

Mas bom cada um faz oque quer nй.