( Pomoc ) House System....

Započeo Alan ã‹¡, Jul 02, 2013, 12:19:57 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 3 gostiju pregledaju ovu temu.


Ovako,uradio sam novi house system,to jest uzeo sam iz jednog GM-a...
I sad napravio sam komandu IG za kreiranje to mi radi,napravio sam i /kupikucu isto radi,ali sada me zeza /kuca,znaci kada kupim kucu pa idem /kuca pise da nemam kucu...

Evo komanda /kupikucu :

YCMD:kupikucu(playerid, params[], help)
{
   // if(PlayerInfo[playerid][pLogin] < 1) return SCM(playerid, COLOR_GREY, "Nisi se ulogovo");

new id = AkoJeBlizuKucaUlaza(playerid);

if(id == -1 || id == 0) return SendClientMessage(playerid, ZUTA, "Nisi blizu kucnog ulaza");

if(KucaInfo[id][kOwned] != 0 || KucaInfo[id][kPrice] == 0) return SendClientMessage(playerid, CRVENA1, "Ova kuca nije na prodaju.");

if(PlayerInfo[playerid][pKucaKljuc] != 999) return SendClientMessage(playerid, ZUTA, "Vec imas kucu.");
new str[128];
format(str, sizeof(str), "Morate biti %d level da bi kupio ovu kucu", KucaInfo[id][kLevel]);
if(PlayerInfo[playerid][pLevel] < KucaInfo[id][kLevel]) return SCM(playerid, ZUTA, str);
    if(GetPlayerMoney(playerid) < KucaInfo[id][kPrice]) return SendClientMessage(playerid, SVETLOPLAVA, "Nemate dovoljno novca za ovu kucu.");

// PlayerInfo[playerid][pKucaKljuc] = id;
PlayerInfo[playerid][pNovcanik] -= KucaInfo[id][kPrice];
GivePlayerMoney(playerid, -KucaInfo[id][kPrice]);

KucaInfo[id][kLocked] = 0;
KucaInfo[id][kOwned] = 1;
KucaInfo[id][kOwner] = GetPlayerNameEx(playerid);

DestroyDynamicPickup(KucaInfo[id][kOutsideIcon]);
DestroyDynamicPickup(KucaInfo[id][kInsideIcon]);
    KucaInfo[id][kOutsideIcon] = CreateDynamicPickup(1239, 1, KucaInfo[id][kEntranceX], KucaInfo[id][kEntranceY], KucaInfo[id][kEntranceZ], KucaInfo[id][kWorld]); //Creates a pickup at the business entrance.
    KucaInfo[id][kInsideIcon] = CreateDynamicPickup(1239, 1, KucaInfo[id][kExitX], KucaInfo[id][kExitY], KucaInfo[id][kExitZ], KucaInfo[id][kInsideWorld]); //Creates a pickup at the exit(Inside the interior)
new string[20];
format(string, sizeof(string), " ");

UpdateDynamic3DTextLabelText(KucaText[id], 0x9EC73DAA, string);
    new vstr[500];
    new ulicaf[128];
    ulicaf = KucaUlica(id);
    format(vstr, sizeof(vstr), "{FFFFFF}Vlasnik: {00FF22}%s\n{FFFFFF}ID: {00FF22}%d\n{FFFFFF}Adresa: {00FF22}%s\n{FFFFFF}Vrsta: {00FF22}%s",KucaInfo[id][kOwner], id, ulicaf, KucaType(id));
    KucaText[id] = CreateDynamic3DTextLabel(vstr, 0xFF0000CC, KucaInfo[id][kEntranceX], KucaInfo[id][kEntranceY], KucaInfo[id][kEntranceZ], 30.0);


SendClientMessage(playerid, ZUTA, "Cestitamo kupili ste kucu | /kuca");
    SSACC(playerid);
return 1;
}




Evo komanda /kuca :

YCMD:kuca(playerid, params[], help)
{
//if(PlayerInfo[playerid][pLogin] < 1) return SCM(playerid, COLOR_GREY, "Nisi se ulogovo");
if(PlayerInfo[playerid][pKucaKljuc] == 999) return SCM(playerid, ZUTA, "Neposjedujes kucu");
SPD(playerid, DIALOG_KKONTROLA, DSL, "{FFFFFF}Kuca", "Stvari u kucu\nOstavi novac\nIzvadi novac\nOstavi drogu\nIzvadi drogu\nZakljucaj kucu\nOtkljucaj kucu\nKuca info\nProdaj kucu drzavi\nProdaj igracu\nRent info", "Odaberi", "Odustani");
SacuvajKuce(PlayerInfo[playerid][pKucaKljuc]);
return 1;
}


Ako jos nesto treba recite....

pax95

// PlayerInfo[playerid][pKucaKljuc] = id;
Vidi da si stavio pod komentar obrisi //