13.06.2012, 07:21
When i /createhouse i can buy it, but i want when i /createhouse appers little green house... And when i buy it (/buyhouse) appers little blue house... Anyone help?
What does being a doctor have to do with scripting lol
http://en.wikipedia.org/wiki/Physician You mean psychic. |
COMMAND:buycell(playerid, params[]) { new str[128]; if(PlayerStat[playerid][HasCell] == 1) return SendClientMessage(playerid, GREY, "Vec imas zatvor, ako zelis prodati /sellcell ili /sellcellto."); for(new c = 0; c < MAX_CELLS; c++) { if(IsPlayerInRangeOfPoint(playerid, 1.0, CellStat[c][ExteriorX], CellStat[c][ExteriorY], CellStat[c][ExteriorZ])) { if(CellStat[c][Owned] == 1) return SendClientMessage(playerid, GREY, "Ovaj zatvor nije dostupan."); { if(PlayerStat[playerid][Money] >= CellStat[c][CellPrice]) { CellStat[c][Owned] = 1; PlayerStat[playerid][HasCell] = 1; PlayerStat[playerid][Cell] = c; GiveMoney(playerid, - CellStat[c][CellPrice]); format(CellStat[c][CellOwner], 60, "%s", GetOOCName(playerid)); format(str, sizeof(str), "Vlasnik ovog zatvora ID %d\nOwner: %s", c, CellStat[c][CellOwner]); Update3DTextLabelText(CellStat[c][TextLabel], RED, str); DestroyDynamicPickup(CellStat[c][PickupID]); CellStat[c][PickupID] = CreateDynamicPickup(1272, 23, CellStat[c][ExteriorX], CellStat[c][ExteriorY], CellStat[c][ExteriorZ], 0, -1, -1, 100.0); format(str, sizeof(str), "Cestitamo! Sada imate svoj vlastiti zatvor (ID: %d).", c); SendClientMessage(playerid, GREEN, str); SaveCell©; } else { format(str, sizeof(str), "Nemozes si priustiti $%d da kupis vlastiti zatvor.", CellStat[c][CellPrice]); SendClientMessage(playerid, GREY, str); } } } } return 1;
COMMAND:createcell(playerid, params[]) { new Price, str[128]; if(PlayerStat[playerid][AdminLevel] < 5) return SendClientMessage(playerid, GREY, "You can't use this command."); if(sscanf(params,"d", Price))return SendClientMessage(playerid, GREY, "USAGE: /createcell [price] (Stand up infron of the cell then use this command)"); if(Server[LoadedCells] > MAX_CELLS) return SendClientMessage(playerid, GREY, "You can't create cells anymore (Max Number of Cells is 100)"); new Float: PosX, Float: PosY, Float: PosZ; GetPlayerPos(playerid, PosX, PosY, PosZ); CreateCell(Price, PosX, PosY, PosZ, PosX -1.7, PosY, PosZ); SendClientMessage(playerid, GREY, "You have successfully created a cell."); format(str, sizeof(str), "Admin %s has created a new cell.", GetOOCName(playerid)); AdminActionLog(str); return 1; }
CellStat[c][PickupID] = CreateDynamicPickup(1272, 23, CellStat[c][ExteriorX], CellStat[c][ExteriorY], CellStat[c][ExteriorZ], 0, -1, -1, 100.0);
CreateDynamicPickup(1272, 23, bla bla bla);