Nнvel das casas -
Mteck - 26.01.2013
Como mudo o Nнvel das casas? jб procurei aqui mas nгo achei.. estou quebrando a cabeзa com essa merd@.
Re: Nнvel das casas -
Dwayne-Pheonix - 26.01.2013
O que seria 'nнvel das casas' ?
Re: Nнvel das casas -
Mteck - 26.01.2013
Level para os "prayers" comprarem.
Re: Nнvel das casas -
silenthill - 26.01.2013
no seu gm so pode comprar casa com determinado level? coloca o comando /comprarcasa
Re: Nнvel das casas -
Smoking_Script - 26.01.2013
Eu tb tou nessa duvida se puder ajuda tenho exemplo no link abaixo
Re: Nнvel das casas -
Dwayne-Pheonix - 26.01.2013
Poste o cуdigo do seu sistema para podermos ver onde vai modifica-lo.
Re: Nнvel das casas -
Mteck - 26.01.2013
Seria isso?
pawn Код:
HouseInfo[h][hRent] = 200;
O nнvel das casas estгo em '200'.
@
pawn Код:
if(strcmp(cmd, "/comprarcasa", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new Float:oldposx, Float:oldposy, Float:oldposz;
GetPlayerName(playerid, playername, sizeof(playername));
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
for(new h = 0; h < sizeof(HouseInfo); h++)
{
if(PlayerToPoint(2.0, playerid, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]) && HouseInfo[h][hOwned] == 0)
{
if(PlayerInfo[playerid][pLevel] < HouseInfo[h][hLevel])
{
format(string, sizeof(string), " Vocк precisa ter nivel %d Para comprar! !", HouseInfo[h][hLevel]);
MSGPLAYER(playerid, COLOR_GRAD5, string);
return 1;
}
if(PlayerInfo[playerid][pPHousekey] != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPHousekey]][hOwner], true) == 0)
{
MSGPLAYER(playerid, COLOR_WHITE, " Vocк tem uma casa para vender digite /vendercasa, vocк receberб o mesmo valor que foi pago!");
return 1;
}
if(GetPlayerMoney(playerid) > HouseInfo[h][hValue])
{
PlayerInfo[playerid][pPHousekey] = h;
PlayerInfo[playerid][pPHouseCarkey] = PlayerInfo[playerid][pPHousekey]+totalveiculosh;
HouseInfo[h][hOwned] = 1;
HouseInfo[h][hExitx] = 234.0843;
HouseInfo[h][hExity] = 1064.6896;
HouseInfo[h][hExitz] = 1084.2108;
HouseInfo[h][hInt] = 6;
HouseInfo[h][hRentabil] = 1;
HouseInfo[h][hRent] = 200;
GetPlayerName(playerid, sendername, sizeof(sendername));
strmid(HouseInfo[h][hOwner], sendername, 0, strlen(sendername), 255);
GivePlayerMoney(playerid,-HouseInfo[h][hValue]);
PlayerPlayMusic(playerid);
PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
GameTextForPlayer(playerid, "~w~Parabens pela compra ~n~~b~Para entrar digite /entrar", 5000, 3);
MSGPLAYER(playerid, COLOR_WHITE, "Parabйns pela sua nova casa!");
MSGPLAYER(playerid, COLOR_WHITE, "Digite /ajuda Em caso de duvidas!");
PlayerInfo[playerid][pSpawn] = 1;
DateProp(playerid);
Atualizar3Dtexts();
OnPropUpdate();
return 1;
}
else
{
MSGPLAYER(playerid, COLOR_WHITE, " Vocк nгo tem dinheiro o suficiente. !");
return 1;
}
}
}
}
return 1;
}
Re: Nнvel das casas -
silenthill - 26.01.2013
ahhhhhhhhhhhh entendi ...deve ser no public up n? aff so vendo o bagui de cabo a rabo
Re: Nнvel das casas -
Mteck - 26.01.2013
Que public seria essa?
Re: Nнvel das casas -
Dwayne-Pheonix - 26.01.2013
Simples modifique nessa parte
pawn Код:
if(PlayerInfo[playerid][pLevel] < HouseInfo[h][hLevel]) {
format(string, sizeof(string), " Vocк precisa ter nivel %d Para comprar! !", HouseInfo[h][hLevel]);
MSGPLAYER(playerid, COLOR_GRAD5, string);
return 1;
}
Onde й feito a checagem PlayerInfo[playerid][pLevel] < HouseInfo[h][hLevel] vocк tem duas alternativas:
Modifique HouseInfo[h][hLevel] por um valor padrгo e adapte o operador.
Ou procure modificar o valor da variavel HouseInfo[h][hLevel] de cada casa