Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:next(playerid)
- {
- new h = GetPlayerHouseID(playerid);
- if(h != INVALID_HOUSE_ID && p_temp[playerid][h_repair_txtid] != -1)
- {
- new h_class = h_info[h][h_squar]-1;
- new int_id = h_info[h][h_int];
- STRING_GLOBAL[0] = EOS;
- f(STRING_GLOBAL,"%d$", h_info[h][h_squar]*TEXTURE_HOUSE_PRICE);
- if(IsPlayerInRangeOfPoint(playerid, 50.0, h_ints[h_class][int_id][i_spawn_pos][0],h_ints[h_class][int_id][i_spawn_pos][1],h_ints[h_class][int_id][i_spawn_pos][2]) && h+50 == GetPlayerVirtualWorld(playerid))
- {
- new txd_max_value = GetMaxCountTextureHouse(p_temp[playerid][h_repair_txtid]);
- if(txd_max_value == -1) return SendError(playerid, "КОД: 7099 / Обратитесь на форум! %і", p_temp[playerid][h_repair_txtid]);
- p_temp[playerid][shop_id]++;
- if(p_temp[playerid][shop_id] >= txd_max_value) p_temp[playerid][shop_id] = 0;
- h_info[h][h_mapping_id][p_temp[playerid][h_repair_txtid]] = p_temp[playerid][shop_id];
- House_Repair(h);
- }
- if(h_class == 0) return 1;
- if(IsPlayerInRangeOfPoint(playerid, 50.0, g_info[h_class-1][g_pX], g_info[h_class-1][g_pY], g_info[h_class-1][g_pZ]) && h+50 == GetPlayerVirtualWorld(playerid))
- {
- new txd_max_value = GetMaxCountTextureGarage(p_temp[playerid][h_repair_txtid]);
- if(txd_max_value == -1) return SendError(playerid, "КОД: 7098 / Обратитесь на форум! %і", p_temp[playerid][h_repair_txtid]);
- p_temp[playerid][shop_id]++;
- if(p_temp[playerid][shop_id] >= txd_max_value) p_temp[playerid][shop_id] = 0;
- h_info[h][h_garage_id][p_temp[playerid][h_repair_txtid]] = p_temp[playerid][shop_id];
- Garage_Repair(h);
- }
- ShowTextDrawForPlayer(playerid, TD_ID_SHOP);
- PlayerTextDrawSetString(playerid, PTD_Shop[playerid][10], STRING_GLOBAL);
- return 1;
- }
- new biz_id = GetPVarInt(playerid, "bID");
- if(b_info[biz_id][_tip] == 2 && PlayerToPoint(5.0,playerid,b_info[biz_id][b_menu][0],b_info[biz_id][b_menu][1],b_info[biz_id][b_menu][2]))
- {
- if(!gang(playerid) && !mafia(playerid) && !biker(playerid) && p_info[playerid][fwork] != true)
- {
- new string[256];
- if(p_info[playerid][sex] == 2)
- {
- p_temp[playerid][shop_id]++;
- if(p_temp[playerid][shop_id] >= sizeof(skinBuyMan)) p_temp[playerid][shop_id] = 0;
- SetPlayerSkin(playerid,skinBuyMan[p_temp[playerid][shop_id]][0]);
- format(string,sizeof(string),"%d$",skinBuyMan[p_temp[playerid][shop_id]][1]);
- PlayerTextDrawSetString(playerid, PTD_Shop[playerid][10], string);
- }
- else
- {
- p_temp[playerid][shop_id]++;
- if(p_temp[playerid][shop_id] >= sizeof(skinBuyMale)) p_temp[playerid][shop_id] = 0;
- SetPlayerSkin(playerid,skinBuyMale[p_temp[playerid][shop_id]][0]);
- format(string,sizeof(string),"%d$",skinBuyMale[p_temp[playerid][shop_id]][1]);
- PlayerTextDrawSetString(playerid, PTD_Shop[playerid][10], string);
- }
- return 1;
- }
- }
- else if(b_info[biz_id][_tip] == 10 && PlayerToPoint(5.0,playerid,b_info[biz_id][b_menu][0],b_info[biz_id][b_menu][1],b_info[biz_id][b_menu][2]))
- {
- new string[256];
- new acoords = GetPVarInt(playerid, "AccessoriesCoords"), ainfo = GetPVarInt(playerid, "AccessoriesInfo"), idx = GetPVarInt(playerid, "@accessories");
- if(idx == 86) return 1;
- if(AccessoriesInfo[idx+1][aType] == ainfo)
- {
- SetPVarInt(playerid, "@accessories", idx + 1);
- new sidx = GetPVarInt(playerid, "@accessories"), slot = AccessoriesInfo[sidx][aSlot], model = AccessoriesInfo[sidx][aModel], bone = AccessoriesInfo[sidx][aBone], skin_idx = GetPlayerSkin(playerid);
- new
- Float:fOffsetX = AccessoriesCoords[acoords][skin_idx][0], Float:fOffsetY = AccessoriesCoords[acoords][skin_idx][1], Float:fOffsetZ = AccessoriesCoords[acoords][skin_idx][2],
- Float:fRotX = AccessoriesCoords[acoords][skin_idx][3], Float:fRotY = AccessoriesCoords[acoords][skin_idx][4], Float:fRotZ = AccessoriesCoords[acoords][skin_idx][5],
- Float:fScaleX = AccessoriesCoords[acoords][skin_idx][6], Float:fScaleY = AccessoriesCoords[acoords][skin_idx][7], Float:fScaleZ = AccessoriesCoords[acoords][skin_idx][8];
- if(IsPlayerAttachedObjectSlotUsed(playerid, slot)) RemovePlayerAttachedObject(playerid, slot);
- SetPlayerAttachedObject(playerid, slot, model, bone, fOffsetX, fOffsetY, fOffsetZ, fRotX, fRotY, fRotZ, fScaleX, fScaleY, fScaleZ);
- format(string,sizeof(string),"%d$", AccessoriesInfo[sidx][aPrice]);
- PlayerTextDrawSetString(playerid, PTD_Shop[playerid][10], string);
- }
- return 1;
- }
- return 1;
- }
- CMD:back(playerid)
- {
- new h = GetPlayerHouseID(playerid);
- if(h != INVALID_HOUSE_ID && p_temp[playerid][h_repair_txtid] != -1)
- {
- new h_class = h_info[h][h_squar]-1;
- new int_id = h_info[h][h_int];
- STRING_GLOBAL[0] = EOS;
- f(STRING_GLOBAL,"%d$", h_info[h][h_squar]*TEXTURE_HOUSE_PRICE);
- ShowTextDrawForPlayer(playerid, TD_ID_SHOP);
- PlayerTextDrawSetString(playerid, PTD_Shop[playerid][10], STRING_GLOBAL);
- if(IsPlayerInRangeOfPoint(playerid, 50.0, h_ints[h_class][int_id][i_spawn_pos][0],h_ints[h_class][int_id][i_spawn_pos][1],h_ints[h_class][int_id][i_spawn_pos][2]) && h+50 == GetPlayerVirtualWorld(playerid))
- {
- new txd_max_value = GetMaxCountTextureHouse(p_temp[playerid][h_repair_txtid]);
- if(txd_max_value == -1) return SendError(playerid, "КОД: 7099 / Обратитесь на форум! %і", p_temp[playerid][h_repair_txtid]);
- p_temp[playerid][shop_id]--;
- if(p_temp[playerid][shop_id] < 0) p_temp[playerid][shop_id] = (txd_max_value-1);
- h_info[h][h_mapping_id][p_temp[playerid][h_repair_txtid]] = p_temp[playerid][shop_id];
- House_Repair(h);
- }
- if(h_class == 0) return 1;
- if(IsPlayerInRangeOfPoint(playerid, 50.0, g_info[h_class-1][g_pX], g_info[h_class-1][g_pY], g_info[h_class-1][g_pZ]) && h+50 == GetPlayerVirtualWorld(playerid))
- {
- new txd_max_value = GetMaxCountTextureGarage(p_temp[playerid][h_repair_txtid]);
- if(txd_max_value == -1) return SendError(playerid, "КОД: 7098 / Обратитесь на форум! %і", p_temp[playerid][h_repair_txtid]);
- p_temp[playerid][shop_id]--;
- if(p_temp[playerid][shop_id] < 0) p_temp[playerid][shop_id] = (txd_max_value-1);
- h_info[h][h_garage_id][p_temp[playerid][h_repair_txtid]] = p_temp[playerid][shop_id];
- Garage_Repair(h);
- }
- return 1;
- }
- new biz_id = GetPVarInt(playerid, "bID");
- if(b_info[biz_id][_tip] == 2 && PlayerToPoint(5.0,playerid,b_info[biz_id][b_menu][0],b_info[biz_id][b_menu][1],b_info[biz_id][b_menu][2]))
- {
- if(!gang(playerid) && !mafia(playerid) && !biker(playerid) && p_info[playerid][fwork] != true)
- {
- new string[256];
- if(p_info[playerid][sex] == 2)
- {
- p_temp[playerid][shop_id]--;
- if(p_temp[playerid][shop_id] < 0) p_temp[playerid][shop_id] = (sizeof(skinBuyMan)-1);
- SetPlayerSkin(playerid,skinBuyMan[p_temp[playerid][shop_id]][0]);
- format(string,sizeof(string),"%d$",skinBuyMan[p_temp[playerid][shop_id]][1]);
- PlayerTextDrawSetString(playerid, PTD_Shop[playerid][10], string);
- }
- else
- {
- p_temp[playerid][shop_id]--;
- if(p_temp[playerid][shop_id] < 0) p_temp[playerid][shop_id] = (sizeof(skinBuyMale)-1);
- SetPlayerSkin(playerid,skinBuyMale[p_temp[playerid][shop_id]][0]);
- format(string,sizeof(string),"%d$",skinBuyMale[p_temp[playerid][shop_id]][1]);
- PlayerTextDrawSetString(playerid, PTD_Shop[playerid][10], string);
- }
- }
- //ApplyAnimation(playerid,"CARRY","crry_prtial",4.1,0,1,1,1,1);
- }
- else if(b_info[biz_id][_tip] == 10 && PlayerToPoint(5.0,playerid,b_info[biz_id][b_menu][0],b_info[biz_id][b_menu][1],b_info[biz_id][b_menu][2]))
- {
- new string[256];
- new acoords = GetPVarInt(playerid, "AccessoriesCoords"), ainfo = GetPVarInt(playerid, "AccessoriesInfo"), idx = GetPVarInt(playerid, "@accessories");
- if(idx == 0) return 1;
- if(AccessoriesInfo[idx-1][aType] == ainfo)
- {
- SetPVarInt(playerid, "@accessories", idx - 1);
- new sidx = GetPVarInt(playerid, "@accessories"), slot = AccessoriesInfo[sidx][aSlot], model = AccessoriesInfo[sidx][aModel], bone = AccessoriesInfo[sidx][aBone], skin_idx = GetPlayerSkin(playerid);
- new
- Float:fOffsetX = AccessoriesCoords[acoords][skin_idx][0], Float:fOffsetY = AccessoriesCoords[acoords][skin_idx][1], Float:fOffsetZ = AccessoriesCoords[acoords][skin_idx][2],
- Float:fRotX = AccessoriesCoords[acoords][skin_idx][3], Float:fRotY = AccessoriesCoords[acoords][skin_idx][4], Float:fRotZ = AccessoriesCoords[acoords][skin_idx][5],
- Float:fScaleX = AccessoriesCoords[acoords][skin_idx][6], Float:fScaleY = AccessoriesCoords[acoords][skin_idx][7], Float:fScaleZ = AccessoriesCoords[acoords][skin_idx][8];
- if(IsPlayerAttachedObjectSlotUsed(playerid, slot)) RemovePlayerAttachedObject(playerid, slot);
- SetPlayerAttachedObject(playerid, slot, model, bone, fOffsetX, fOffsetY, fOffsetZ, fRotX, fRotY, fRotZ, fScaleX, fScaleY, fScaleZ);
- format(string,sizeof(string),"%d$", AccessoriesInfo[sidx][aPrice]);
- PlayerTextDrawSetString(playerid, PTD_Shop[playerid][10], string);
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement