21.05.2011, 00:17
Quote:
if (strcmp("/comprar", cmdtext, true, 10) == 0) { if(SBizzInfo[9][sbProducts] == 0) { GameTextForPlayer(playerid, "~r~fim de estoque", 5000, 1); return 1; } if(IsAtLoja(playerid)) { new listitems[] = "R$500 - Celular\nR$500 - Cartгo\nR$10 - Agenda\nR$500 - Dado\nR$5000 - Chaves\nR$10000 - Trava de Veнculo\nR$5000 - Velocimetro\nR$50 - Preservativo\nR$250 - IPod\nR$10 - Frango\nR$10 - Hamburguer\nR$10 - Pizza Congelada\nR$10 - Corda\nR$50 - Maзo de Cigarro\n"; ShowPlayerDialog(playerid,6271,DIALOG_STYLE_LIST," Lista de Produtos:\nQual deseja comprar?\n",listitems,"Comprar","Sair"); return 1; } else { SendClientMessage(playerid, COLOR_GRAD2, "Vocк nгo estб em um bar"); return 1; } } if(strcmp(cmd, "/comprarcasa", true) == 0) { if(IsPlayerConnected(playerid)) { new Floatldposx, Floatldposy, Floatldposz; 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 de Nнvel %d para comprar essa Casa !", HouseInfo[h][hLevel]); SendClientMessage(playerid, COLOR_GRAD5, string); return 1; } if(PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0) { SendClientMessage(playerid, COLOR_WHITE, " Vocк jб й o dono desta casa, digite /vendercasa para vender e comprar outra."); return 1; } if(GetPlayerGP(playerid) > HouseInfo[h][hValue]) { PlayerInfo[playerid][pPhousekey] = h; HouseInfo[h][hOwned] = 1; LocalSpawn[playerid] = 1; GetPlayerName(playerid, sendername, sizeof(sendername)); strmid(HouseInfo[h][hOwner], sendername, 0, strlen(sendername), 255); GivePlayerGP(playerid,-HouseInfo[h][hValue]); PlayerPlayMusic(playerid); SetPlayerInterior(playerid,HouseInfo[h][hInt]); SetPlayerVirtualWorld(playerid,HouseInfo[h][hWorld]); SetPlayerPos(playerid,HouseInfo[h][hExitx],HouseInfo[h][hExity],HouseInfo[h][hExitz]); GameTextForPlayer(playerid, "~w~bem vindo~n~voce pode sair qualquer hora ~n~por essa porta digite /sair", 5000, 3); PlayerInfo[playerid][pInt] = HouseInfo[h][hInt]; PlayerInfo[playerid][pLocal] = h; SendClientMessage(playerid, COLOR_WHITE, "Parabйns, essa casa й sua !"); SendClientMessage(playerid, COLOR_WHITE, "Digita /ajuda e veja a sessгo de ajuda de casas !"); DateProp(playerid); OnPropUpdate(); OnPlayerSave(playerid); return 1; } else { SendClientMessage(playerid, COLOR_WHITE, " Vocк nгo tem dinheiro para esse produto !"); return 1; } } } } return 1; } |
e depois fala fim de estoque porque isso ?