[Pomoc] Komande mi ne rade/nisu ispravne

Započeo Mirnas_Tajic, Maj 17, 2012, 21:36:57 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 3 gostiju pregledaju ovu temu.

Mirnas_Tajic

Skripta koju koristim: City Life 3.0
Detaljan opis problema:  Imam problem kod komande /kupfirmu ja kupim firmu al umjesto da mi oduzme pare ono mi doda milione para,i imam problem sa komandom /v park uopce mi ne parkira vozilo a htjeo bi da mi ga odma parkira
Dio skripte:
/kupifirmu:
if(strcmp(cmd, "/kupifirmu", true) == 0)
{
    if(IsPlayerConnected(playerid))
{
new Float:oldposx, Float:oldposy, Float:oldposz;
GetPlayerName(playerid, playername, sizeof(playername));
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
            if(PlayerInfo[playerid][pPbiskey] != 255)
{
SendClientMessage(playerid, COLOR_WHITE, "   Vec posedujete biznis, kucajte /prodajfirmu ako zelite da kupite ovaj.");
return 1;
}
for(new b = 0; b < sizeof(SBizzInfo); b++)
{
if(PlayerToPoint(2.0, playerid, SBizzInfo[b][sbEntranceX], SBizzInfo[b][sbEntranceY], SBizzInfo[b][sbEntranceZ]) && SBizzInfo[b][sbOwned] == 0)
{
if(PlayerInfo[playerid][pLevel] < SBizzInfo[b][sbLevelNeeded])
{
format(string, sizeof(string), "Morate biti lvl %d da biste kupili to",SBizzInfo[b][sbLevelNeeded]);
SendClientMessage(playerid, COLOR_GRAD5, string);
return 1;
}
if(GetPlayerMoney(playerid) > SBizzInfo[b][sbBuyPrice])
                {
PlayerInfo[playerid][pPbiskey] = b+100;
SBizzInfo[b][sbOwned] = 1;
GetPlayerName(playerid, sendername, sizeof(sendername));
strmid(SBizzInfo[b][sbOwner], sendername, 0, strlen(sendername), 255);
GivePlayerCash(playerid,-SBizzInfo[b][sbBuyPrice]);
SendClientMessage(playerid, COLOR_WHITE, "Cestitamo vam na novom biznisu.");
SendClientMessage(playerid, COLOR_WHITE, "Kucajte /komande da pogledate pomoc oko biznisa.");
                        DateProp(playerid);
OnPropUpdate();
OnPropTextdrawUpdate(3, b);
SacuvajIgraca(playerid);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "Nemate dovoljno novca da kupite to");
return 1;
}
}
}
for(new b = 0; b < sizeof(BizzInfo); b++)
{
if(PlayerToPoint(2.0, playerid, BizzInfo[b][bEntranceX], BizzInfo[b][bEntranceY], BizzInfo[b][bEntranceZ]) && BizzInfo[b][bOwned] == 0)
{
if(PlayerInfo[playerid][pLevel] < BizzInfo[b][bLevelNeeded])
{
format(string, sizeof(string), "Morate biti level %d da kupite to",BizzInfo[b][bLevelNeeded]);
SendClientMessage(playerid, COLOR_GRAD5, string);
return 1;
}
if(GetPlayerMoney(playerid) > BizzInfo[b][bBuyPrice])
{
PlayerInfo[playerid][pPbiskey] = b;
BizzInfo[b][bOwned] = 1;
GetPlayerName(playerid, sendername, sizeof(sendername));
strmid(BizzInfo[b][bOwner], sendername, 0, strlen(sendername), 255);
GivePlayerCash(playerid,-BizzInfo[b][bBuyPrice]);
SetPlayerInterior(playerid,BizzInfo[b][bInterior]);
PlayerInfo[playerid][pInt] = BizzInfo[b][bInterior];
SetPlayerPos(playerid,BizzInfo[b][bExitX],BizzInfo[b][bExitY],BizzInfo[b][bExitZ]);
GameTextForPlayer(playerid, "~w~Dobrodosli~n~Mozete izaci u svakom trenutku ako dodjete do vrata i kucate /exit", 5000, 3);
PlayerInfo[playerid][pInt] = BizzInfo[b][bInterior];
PlayerInfo[playerid][pLocal] = b ;
SendClientMessage(playerid, COLOR_WHITE, "Cestitamo vam na novom biznisu.");
SendClientMessage(playerid, COLOR_WHITE, "Kucajte /komande da pogledate pomoc oko biznisa.");
                        DateProp(playerid);
OnPropUpdate();
OnPropTextdrawUpdate(2, b);
SacuvajIgraca(playerid);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "Nemate dovoljno novca da kupite to");
return 1;
}
}
}
}
return 1;
}


/v park:
if(strcmp(x_nr,"park",true) == 0)
{
if (IsPlayerInVehicle(playerid,Carlist[playerid][Carid]))
{
    GetVehiclePos(Carlist[playerid][Carid],Carlist[playerid][X3],Carlist[playerid][Y3],Carlist[playerid][Z3]);
    GetVehicleZAngle(Carlist[playerid][Carid],Carlist[playerid][Rotation]);
    new componentid = GetModType(componentid);
OnVehicleMod(playerid,Carlist[playerid][Carid],componentid);
VehicleSave(playerid);
    SendClientMessage(playerid, COLOR_YELLOW, "Tvoje ce se vozilo odsada ovde spawnati");
}
else { SendClientMessage(playerid, COLOR_GREY, "Ovo nije vase vozilo!"); }
return 1;
}
else if(strcmp(x_nr,"fix",true) == 0)
{
    if (Carlist[playerid][Typ]!=-1)
    {
if (Carlist[playerid][Status]==0)
{
    new reparatur = Buylist[Carlist[playerid][Typ]][Repair];
if (reparatur <= GetPlayerMoney(playerid))
{
    Carlist[playerid][Status]=1;
    Carlist[playerid][Carid]=CreateTunedCar(playerid);
GivePlayerMoney(playerid, - reparatur);
format(string, 128, "* Cena popravka auta iznosi {FFFFFF}$%i! "COL_YELLOW"Automobil je dostavljen na vase parking mesto!.", reparatur);
SendClientMessage(playerid, YELLOW, string);
}
else { format(string, 128, "* Nedovoljno novca za popravak! (Potrebno: {FFFFFF}$%i)!", reparatur); SendClientMessage(playerid, YELLOW, string); }
}
        else { SendClientMessage(playerid, COLOR_GREY, "Vase vozilo ne treba popravak!"); }
}
else { SendClientMessage(playerid, COLOR_GREY, "Ne posjedujes vozilo!"); }
return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno):


a da pitam jer neko zna kako da napravim patarinu da bide zatvorena kad pisem /toll da platim da se otvori ?

Snich

Citat: Zare_Nicovski poslato Maj 17, 2012, 23:38:13 POSLE PODNE
a da pitam jer neko zna kako da napravim patarinu da bide zatvorena kad pisem /toll da platim da se otvori ?
Aj ti "bide" procitaj Pravila ovog Podforuma pa ce se otvorit ta "patarina" (ili sto vec).

A ti autore, vec imas jednu temu na koju si postao isti problem, znaci tamo cekaj rjesenje,

LOCK!