Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:addentradahouse(playerid, params[])
- {
- if(Player[playerid][pAdmin] < 7)
- return SendClientMessage(playerid, COLOR_RED, "[ERRO] Você não tem permissão para usar este comando!");
- new idx;
- new tmp[24]; tmp = strtok(params, idx);
- if(!strlen(tmp))
- return SendClientMessage(playerid, COLOR_GREY, "[USO] /addentradacasa [houseid] - Move a casa até você.");
- new h = strval(tmp);
- if(h > sizeof(HouseInfo) || h < 0)
- return SendClientMessage(playerid,COLOR_RED, "[ERRO] O ID da casa deve ser de 0 à 64.");
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid,X,Y,Z);
- format(thestring,sizeof(thestring)," %s mudou a entrada da casa %d para %f - %f - %f",Player[playerid][pName],h,X,Y,Z);
- WriteLog("rpedits", thestring);
- ABroadCast(COLOR_YELLOW,thestring,5);
- HouseInfo[h][hEntrancex] = X;
- HouseInfo[h][hEntrancey] = Y;
- HouseInfo[h][hEntrancez] = Z;
- DestroyDynamicPickup(HouseInfo[h][hIcon]);
- Delete3DTextLabel(HouseInfo[h][HouseLabel]);
- if(HouseInfo[h][hOwned] == 1)
- {
- HouseInfo[h][hIcon] = CreateDynamicPickup(1239, 1, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
- pickups++;
- if(HouseInfo[h][hRentabil] == 0)
- format(thestring, sizeof(thestring), "Proprietário da casa: %s \nLevel : %d",hOwner[h],HouseInfo[h][hLevel]);
- else
- format(thestring, sizeof(thestring), "Proprietário da casa: %s \nAluguel: R$ %d - Level : %d \nDigite /alugarcasa para alugar um quarto",hOwner[h],HouseInfo[h][hRent],HouseInfo[h][hLevel]);
- HouseInfo[h][HouseLabel] = Create3DTextLabel(thestring ,COLOR_WHITE, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+1.0,30.0,0);
- }
- if(HouseInfo[h][hOwned] == 0)
- {
- HouseInfo[h][hIcon] = CreateDynamicPickup(1273, 1, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
- pickups++;
- format(thestring, sizeof(thestring), "A casa está a venda \n Descricão: %s \n Preco: R$ %d - Level : %d\n Para comprar digite /comprarcasa",hDiscription[h],HouseInfo[h][hValue],HouseInfo[h][hLevel]);
- HouseInfo[h][HouseLabel] = Create3DTextLabel(thestring ,COLOR_WHITE, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+1.0,30.0,0);
- }
- //SaveProperty(h);
- OnPropUpdate();
- return 1;
- }
- CMD:addspawn(playerid, params[])
- {
- if(Player[playerid][pAdmin] < 7)
- return SendClientMessage(playerid, COLOR_RED, "[ERRO] Você não tem permissão para usar este comando!");
- new idx;
- new tmp[24]; tmp = strtok(params, idx);
- if(!strlen(tmp))
- return SendClientMessage(playerid, COLOR_GREY, "[USO] /addspawn [houseid]");
- new proplev = strval(tmp);
- if(proplev > sizeof(HouseInfo) || proplev < 0)
- return SendClientMessage(playerid,COLOR_RED, "[ERRO] O ID da casa deve ser de 0 à 91.");
- else
- {
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid,X,Y,Z);
- format(thestring,sizeof(thestring),"Spawn da casa %d mudada %f - %f - %f",proplev,X,Y,Z);
- ABroadCast(COLOR_YELLOW,thestring,5);
- HouseInfo[proplev][hExitx] = X;
- HouseInfo[proplev][hExity] = Y;
- HouseInfo[proplev][hExitz] = Z;
- //SaveProperty(proplev);
- OnPropUpdate();
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment