[Pomoc] Novac ode u minus

Započeo Mirnas_Tajic, Maj 17, 2012, 22:39:38 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 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 npr. 58000 K ono stavi novac u -58000 tako kad kubil nesto bilo sta na kiosku mi se to desava ,i imam problem sa komandom /v park uopce mi ne parkira vozilo a htjeo bi da mi ga odma parkira
tako da vam evo komande /kiosk,/kupifirmu,/v park
Dio skripte:

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;
}


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;
}



if(strcmp(cmd, "/kiosk", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
if (PlayerToPoint(4.0, playerid,1531.0088,-1738.5283,13.5469)) //kiosk
{
if(SBizzInfo[16][sbProducts] == 0)
{
GameTextForPlayer(playerid, "~r~Nema Produkata", 5000, 1);
return 1;
}
ShowPlayerDialog(playerid, 69, DIALOG_STYLE_LIST, "{00C0FF}SuperMarket", "Telefon 150$\nSrecka $500\nImenik $100\nKockica $10\nUpaljac $5\nCigare $30\nKondom $1\nKamera $50\nMaska $500\nSat $100\nOprema za ribolov $150\nKonop $10\nSprej $50\nPovez $10", "U redu", "Odustani");
}
else if (PlayerToPoint(4.0, playerid,1484.0363,-1029.4645,23.6563)) //kiosk br 2
{
if(SBizzInfo[17][sbProducts] == 0)
{
GameTextForPlayer(playerid, "~r~Nema Produkata", 5000, 1);
return 1;
}
ShowPlayerDialog(playerid, 79, DIALOG_STYLE_LIST, "{00C0FF}SuperMarket", "Telefon 150$\nSrecka $500\nImenik $100\nKockica $10\nUpaljac $5\nCigare $30\nKondom $1\nKamera $50\nMaska $500\nSat $100\nOprema za ribolov $150\nKonop $10\nSprej $50\nPovez $10", "U redu", "Odustani");
}
else if (PlayerToPoint(4.0, playerid,1147.3217,-935.4334,43.1540)) //kiosk br 3
{
if(SBizzInfo[18][sbProducts] == 0)
{
GameTextForPlayer(playerid, "~r~Nema Produkata", 5000, 1);
return 1;
}
ShowPlayerDialog(playerid, 89, DIALOG_STYLE_LIST, "{00C0FF}SuperMarket", "Telefon 150$\nSrecka $500\nImenik $100\nKockica $10\nUpaljac $5\nCigare $30\nKondom $1\nKamera $50\nMaska $500\nSat $100\nOprema za ribolov $150\nKonop $10\nSprej $50\nPovez $10", "U redu", "Odustani");
}
else if (PlayerToPoint(4.0, playerid,1230.8046,-1276.6183,13.3828)) //kiosk br 4
{
if(SBizzInfo[19][sbProducts] == 0)
{
GameTextForPlayer(playerid, "~r~Nema Produkata", 5000, 1);
return 1;
}
ShowPlayerDialog(playerid, 99, DIALOG_STYLE_LIST, "{00C0FF}SuperMarket", "Telefon 150$\nSrecka $500\nImenik $100\nKockica $10\nUpaljac $5\nCigare $30\nKondom $1\nKamera $50\nMaska $500\nSat $100\nOprema za ribolov $150\nKonop $10\nSprej $50\nPovez $10", "U redu", "Odustani");
}
else if (PlayerToPoint(4.0, playerid,1827.5243,-1891.1887,13.5174)) //kiosk br 5
{
if(SBizzInfo[20][sbProducts] == 0)
{
GameTextForPlayer(playerid, "~r~Nema Produkata", 5000, 1);
return 1;
}
ShowPlayerDialog(playerid, 100, DIALOG_STYLE_LIST, "{00C0FF}SuperMarket", "Telefon 150$\nSrecka $500\nImenik $100\nKockica $10\nUpaljac $5\nCigare $30\nKondom $1\nKamera $50\nMaska $500\nSat $100\nOprema za ribolov $150\nKonop $10\nSprej $50\nPovez $10", "U redu", "Odustani");
}
else if (PlayerToPoint(4.0, playerid,2012.1190,-1455.0481,13.5547)) //kiosk br 6
{
if(SBizzInfo[9][sbProducts] == 0)
{
GameTextForPlayer(playerid, "~r~Nema Produkata", 5000, 1);
return 1;
}
ShowPlayerDialog(playerid, 210, DIALOG_STYLE_LIST, "{00C0FF}SuperMarket", "Telefon 150$\nSrecka $500\nImenik $100\nKockica $10\nUpaljac $5\nCigare $30\nKondom $1\nKamera $50\nMaska $500\nSat $100\nOprema za ribolov $150\nKonop $10\nSprej $50\nPovez $10", "U redu", "Odustani");
}
else
            {
        SendClientMessage(playerid, WHITE, ""COL_RED"| CityBot |{FFFFFF} Ne nalazite se kod "COL_RED"Kioska!");
    return 1;
            }
}
return 1;
}


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

Snich

Pokusaj ovako:

Umjesto funkcije:

GivePlayerCash

stavi:

GivePlayerMoney

Ne pitaj nista, samo probaj

Mirnas_Tajic

Snich Fala fare ajde jos da rjesimo i ova 2 buga sto su ostala

Snich

Citat: Mirnas_Tajic poslato Maj 17, 2012, 23:14:04 POSLE PODNE
Snich Fala fare ajde jos da rjesimo i ova 2 buga sto su ostala

off: Ok, to ti dodje 18 eura ;)

on: Kada parkiras vozilo IG vjerujem da ga ne pozicionira, a da li ga pozicioniora nakon restart servera?