pawn Код:
CMD:createhouse(playerid,params[])
{
if(!IsPlayerAdmin(playerid)) return NotAdmin(playerid);
new HousePrice,id = HouseCount, HouseLevel, opis[50];
if(sscanf(params,"iis[128]",HousePrice, HouseLevel, opis)) return Usage(playerid, "/createhouse [Cijena] [Level] [Opis Kuce]");
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
HouseInfo[id][Price] = HousePrice;
HouseInfo[id][Level] = HouseLevel;
HouseInfo[id][Owned] = 0;
HouseInfo[id][XPos] = x;
HouseInfo[id][YPos] = y;
HouseInfo[id][ZPos] = z;
HouseInfo[id][VirtualWorld] = GetPlayerVirtualWorld(playerid);
format(HouseInfo[id][Opis], 50, "%s", opis);
format(HouseInfo[id][Owner],24,"Nitko");
SendClientMessage(playerid, -1, ""#COL_BLUE"[House Kuca] Nova kuca je napravljena na vasoj poziciji!");
HouseEnter[id] = CreatePickup(1273, 23, x,y,z,GetPlayerVirtualWorld(playerid));
HouseExit[id] = CreatePickup(1239, 23, 443.9237,509.4609,1001.4195,GetPlayerVirtualWorld(playerid));
new file[40],labelstring[256];
format(file,sizeof(file),"House/Kuce/%i.ini",id);
new INI:kuca = INI_Open(file);
INI_WriteInt(kuca, "Cijena",HousePrice);
INI_WriteInt(kuca, "Level",HouseLevel);
INI_WriteInt(kuca, "Zauzeto",0);
INI_WriteInt(kuca, "VirtualWorld",GetPlayerVirtualWorld(playerid));
INI_WriteFloat(kuca, "XPos",x);
INI_WriteFloat(kuca, "YPos",y);
INI_WriteFloat(kuca, "ZPos",z);
INI_WriteString(kuca, "Vlasnik","Nitko");
INI_WriteString(kuca, "Opis",opis);
INI_Close(kuca);
format(labelstring,sizeof(labelstring),"Vlasnik: Nitko \nCijena: %i\nLevel: %i\nVrsta kuce: %s",HousePrice, HouseLevel, opis);
HouseInfo[id][HouseLabel] = Create3DTextLabel(labelstring,0xFF0000FF,x,y,z,25.0,GetPlayerVirtualWorld(playerid));
HouseCount++;
return 1;
}