[POMOC] MOZE LOCK

Započeo Danisha, Decembar 14, 2012, 13:56:18 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 3 gostiju pregledaju ovu temu.

Skripta koju koristim:Ravens
Detaljan opis problema:E ovako evo po drugi put pravi stan system na osnovu sistema kuce i sada setstan sve uradim kao u kuce sethouse ali samo promjenim one umesto houseinfo stavim staninfo i to i kad dodjem u igru da setam stan izbaci mi kao komanda da nepostoji
Dio skripte:
CMD:setstan(playerid,params[])
{
new string[512 char], sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
new houseid = -1;
new Float:X, Float:Y, Float:Z
GetPlayerPos(playerid, X,Y,Z);
if(PlayerInfo[playerid][Admin] >= 1338)
{
new string2[256];

for(new h = 0; h < sizeof(StanInfo); h++)
{
if(StanInfo[h][sSetted] == 1)
{
houseid = h + 1;
}
}
if(StanInfo[houseid][sSetted] == 0)
{
format(string, sizeof(string),"LARP/Stanovi/%d.ini",houseid);
dini_Create(string);
new Kucajtee;
if(sscanf(params, "i", Kucajtee))
{
SCM(playerid, COLOR_GRAD2, "Koriscenje: /sethouse [kucajte]");
SCM(playerid, COLOR_GRAD2, "Kucajte: 0 Apartment - 1 Small - 2 Medium - 3 Big");
return 1;
}
if(Kucajtee == 0)
{
StanInfo[houseid][sValue] = 35000;
StanInfo[houseid][sLevel] = 3;
strmid(StanInfo[houseid][sDiscription], "Mali Stan", 0, strlen("Mali Stan"), 255);
if(nextapartment == 24)
{
nextapartment = 25;
StanInfo[houseid][sExitx] = 244.411987; StanInfo[houseid][sExity] = 305.032990; StanInfo[houseid][sExitz] = 999.231995;
StanInfo[houseid][sSAVET] = 1;
}
}
else if(Kucajtee == 1)
{
StanInfo[houseid][sValue] = 55000;
StanInfo[houseid][sLevel] = 4;
strmid(StanInfo[houseid][sDiscription], "Srednji Stan", 0, strlen("Srednji Stan"), 255);
if(nexthouse == 2)
{
nexthouse = 3;
StanInfo[houseid][sExitx] = 225.756989; StanInfo[houseid][sExity] = 1240.000000; StanInfo[houseid][sExitz] = 1082.149902;
StanInfo[houseid][sSAVET] = 2;
}

}
else if(Kucajtee == 2)
{
StanInfo[houseid][sValue] = 65000;
StanInfo[houseid][sLevel] = 5;
strmid(StanInfo[houseid][sDiscription], "Veliki Stan", 0, strlen("Veliki Stan"), 255);
if(nextmedium == 17)
{
nextmedium = 19;
StanInfo[houseid][sExitx] = 140.2267; StanInfo[houseid][sExity] = 1365.9246; StanInfo[houseid][sExitz] = 1083.8594;
StanInfo[houseid][sSAVET] = 5;
}
}
/*else if(Kucajtee == 3)
{
HouseInfo[houseid][hValue] = 85000;
HouseInfo[houseid][hLevel] = 9;
strmid(HouseInfo[houseid][hDiscription], "Velika Kuca", 0, strlen("Velika Kuca"), 255);
if(nextbig == 1)
{
nextbig = 4;
HouseInfo[houseid][hExitx] = 235.3054; HouseInfo[houseid][hExity] = 1186.6835; HouseInfo[houseid][hExitz] = 1080.2578;
HouseInfo[houseid][SAVET] = 3;
}
}*/
StanInfo[houseid][sEntrancex] = X;
StanInfo[houseid][sEntrancey] = Y;
StanInfo[houseid][sEntrancez] = Z;
StanInfo[houseid][sWorld] = houseid;
StanInfo[houseid][sSetted] = 1;
StanInfo[houseid][sLock] = 1;
strmid(StanInfo[houseid][sOwner],"Drzava",0,strlen("Drzava"),255);
strmid(StanInfo[houseid][sMessage],"Na prodaju",0,strlen("Na prodaju"),255);
format(string, sizeof(string),"* Created the stan number %d. The stan was set automatically, Use /edit to edit it if you want.",houseid);
SCM(playerid, COLOR_LIGHTBLUE, string);
format(string,sizeof(string),"[ADMIN]: %s Has Set Stan: [%d]'s entrance to [%f - %f - %f].",sendername,houseid,X,Y,Z);
ABroadCast(COLOR_LIGHTRED,string, 5);
format(string2,sizeof(string2),"{FFFF00}Stan nema Vlasnika! \n {00FF00}ID Stana: {FFFF00}%d \n {00FF00}Cena: {FFFF00}$%d \n {00FF00}Opis: {FFFF00}%s \n {00FF00}Potreban Level: {FFFF00}%d \n {00FF00}Da bi je kupili kucajte {FFFF00}/kupistan",StanInfo[houseid][sWorld], StanInfo[houseid][sValue],StanInfo[houseid][sDiscription], StanInfo[houseid][sLevel]);
StanLabel[houseid] = CreateDynamic3DTextLabel(string2 ,0xFFFFFFAA,X,Y,Z,7);
//HousePickup[houseid] = CreateDynamicPickup(1273, 1, HouseInfo[houseid][hEntrancex], HouseInfo[houseid][hEntrancey], HouseInfo[houseid][hEntrancez]);
OnPropUpdate(6,houseid);
OnPropTextdrawUpdate(4, houseid);
//OnHousePickupUpdate(houseid);
SCM(playerid, COLOR_GREY,"* The label will appear on next server restart due to limit of labels!");
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s je postavio Stan %d.",d,m,y,h,mi,s,sendername,houseid);
AdminLog(string);
}
else SCM(playerid, COLOR_GREY, "* ERROR: Automatic detected Houseid already setted!");
}
else SCM(playerid, COLOR_GRAD1, "** Niste ovlasceni da koristite ovu komandu!");
return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno): ////
Poslednja Izmena: Decembar 14, 2012, 18:00:54 POSLE PODNE od Danisha

izvinjavam se zbog DP ali ljudi pomazite hitno mi je moram stanove da ubacim veceras a nece ih postavi pomocccccccc