Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dcmd_createhouse(playerid, params[])
- {
- #pragma unused params
- new Float:X, Float:Y, Float:Z; new hid = 0;
- new cijena, level, entr;
- if(IsPlayerAdmin(playerid))
- {
- if(sscanf(params, "iii",cijena, level, entr))
- {
- SendClientMessage(playerid, GRAY, "Koriscenje: /createhouse [cena] [level] [enterijer]");
- return 1;
- }
- GetPlayerPos(playerid, X,Y,Z);
- for(new h = 1; h < sizeof(HouseInfo); h++)
- {
- if(HouseInfo[h][hAppointed] == 1)
- {
- hid = h + 1;
- }
- if(hid == 0)
- {
- hid = 1;
- }
- }
- if(entr < 1 || entr > 5)
- {
- SendClientMessage(playerid, COLOR_GREY, "Enterijer ne moze biti manji od 1 ni veci od 5.");
- return 1;
- }
- format(HouseInfo[hid][hOwner], 24, "%s", "Drzava");
- HouseInfo[hid][hEnterX] = X;
- HouseInfo[hid][hEnterY] = Y;
- HouseInfo[hid][hEnterZ] = Z;
- HouseInfo[hid][hOwned] = 0;
- HouseInfo[hid][hAppointed] = 1;
- HouseInfo[hid][hLocked] = 0;
- HouseInfo[hid][hMoney] = 0;
- HouseInfo[hid][hMats] = 0;
- HouseInfo[hid][hDrugs] = 0;
- HouseInfo[hid][hGun] = 0;
- HouseInfo[hid][hGunAmmo] = 0;
- HouseInfo[hid][hPrice] = cijena;
- HouseInfo[hid][hLevel] = level;
- TPUpdate(hid);
- SaveHouses();
- SendClientMessage(playerid, COLOR_WHITE, "Napravili ste novu kucu!");
- if(entr == 1)
- {
- HouseInfo[hid][hExitX] = 2308.7400;
- HouseInfo[hid][hExitY] = -1212.4301;
- HouseInfo[hid][hExitZ] = 1049.0234;
- HouseInfo[hid][hInt] = 6;
- SaveHouses();
- return 1;
- }
- else if(entr == 2)
- {
- HouseInfo[hid][hExitX] = 244.4120;
- HouseInfo[hid][hExitY] = 305.0330;
- HouseInfo[hid][hExitZ] = 999.1484;
- HouseInfo[hid][hInt] = 1;
- SaveHouses();
- return 1;
- }
- else if(entr == 3)
- {
- HouseInfo[hid][hExitX] = 267.1469;
- HouseInfo[hid][hExitY] = 304.9806;
- HouseInfo[hid][hExitZ] = 999.1484;
- HouseInfo[hid][hInt] = 2;
- SaveHouses();
- return 1;
- }
- else if(entr == 4)
- {
- HouseInfo[hid][hExitX] = 2259.9094;
- HouseInfo[hid][hExitY] = -1135.8812;
- HouseInfo[hid][hExitZ] = 1050.6328;
- HouseInfo[hid][hInt] = 10;
- SaveHouses();
- return 1;
- }
- else if(entr == 5)
- {
- HouseInfo[hid][hExitX] = 318.5494;
- HouseInfo[hid][hExitY] = 1115.0696;
- HouseInfo[hid][hExitZ] = 1083.8828;
- HouseInfo[hid][hInt] = 5;
- SaveHouses();
- return 1;
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement