08.11.2016, 14:15
Hello guys, 2-3 days before, I started making my own RolePlay Script! And BOOOM: I've got problem (not errors) I will place my code here! I am not from America/England i am from Serbia and i will explain to you some words:
,, Trafika " - newsstand, newsstall, newspaper stand, kiosk
,, Nisi blizu neke trafike! " - You are not near a newsstand!
,, [GRESKA]: Ta trafika nije na prodaju! " - [ERROR]: The newsstand is not for sale!
,, Vec imas trafiku " - You already have a newsstand/kiosk
,, [GRESKA]: Nemas dovoljno novca da kupis tu trafiku! " - You do not have enough money to buy the newsstand!
,, [INFO]: Uspesno ste kupili trafiku! Ako vam je potrebna pomoc koristi /trafikahelp " - You have successfully purchased the newsstand! If you need assistance benefits /newsstandhelp
,, [Trafika]\nVlasnik: %s\nCena: $%d\nPotreban Level: %d " - [Newsstand] \ nOwner:% s \ nPrice: $% d \nRequired level:% d
,, SIVA " - Grey Color
,, Trafike " - Newsstands
,, Cena " - Price
,, Vlasnistvo " - Owned
,, Vlasnik " - Owner
,, Novac " - Money
Now code:
When I join to the server and when i buy newsstand, newsstand .ini file, where I keep all data from newsstands, nothing happens! the owner does not change , owned does not change nothing changed, except TrafikaID(translate: NewsstandID) !
Please guys help me!!!
,, Trafika " - newsstand, newsstall, newspaper stand, kiosk
,, Nisi blizu neke trafike! " - You are not near a newsstand!
,, [GRESKA]: Ta trafika nije na prodaju! " - [ERROR]: The newsstand is not for sale!
,, Vec imas trafiku " - You already have a newsstand/kiosk
,, [GRESKA]: Nemas dovoljno novca da kupis tu trafiku! " - You do not have enough money to buy the newsstand!
,, [INFO]: Uspesno ste kupili trafiku! Ako vam je potrebna pomoc koristi /trafikahelp " - You have successfully purchased the newsstand! If you need assistance benefits /newsstandhelp
,, [Trafika]\nVlasnik: %s\nCena: $%d\nPotreban Level: %d " - [Newsstand] \ nOwner:% s \ nPrice: $% d \nRequired level:% d
,, SIVA " - Grey Color
,, Trafike " - Newsstands
,, Cena " - Price
,, Vlasnistvo " - Owned
,, Vlasnik " - Owner
,, Novac " - Money
Now code:
Код:
CMD:kupitrafiku(playerid, params[]) { new id = IsPlayerNearTrafika(playerid); if(id == -1 || id == 0) return SCM(playerid, SIVA, " Nisi blizu neke trafike!"); if(TrafikaInfo[id][tVlasnistvo] != 0 || TrafikaInfo[id][tCena] == 0) return SendClientMessage(playerid, 0xFF0000FF, "[GRESKA]: Ta trafika nije na prodaju!"); if(PlayerInfo[playerid][TrafikaID] != 0) return SendClientMessage(playerid, SIVA, " Vec imas trafiku"); if(PlayerInfo[playerid][pNovac] < TrafikaInfo[id][tCena]) return SendClientMessage(playerid, 0xFF0000FF, "[GRESKA]: Nemas dovoljno novca da kupis tu trafiku!"); TrafikaInfo[IsPlayerNearTrafika(playerid)][tVlasnistvo] = 1; TrafikaInfo[IsPlayerNearTrafika(playerid)][tVlasnik] = GetName(playerid); PlayerInfo[playerid][TrafikaID] = id; PlayerInfo[playerid][pNovac] -= TrafikaInfo[id][tCena]; GivePlayerMoney(playerid, -TrafikaInfo[id][tCena]); SendClientMessage(playerid, -1, "[INFO]: {80FF80}Uspesno ste kupili trafiku! Ako vam je potrebna pomoc koristi /trafikahelp"); new string[500]; format(string,sizeof(string),"[{FFFFFF}Trafika{FF8000}]\nVlasnik: {FFFFFF}%s\n{FF8000}Cena: ${FFFFFF}%d\n{FF8000}Potreban Level: {FFFFFF}%d",TrafikaInfo[id][tVlasnik],TrafikaInfo[id][tCena],TrafikaInfo[id][tLevel]); Update3DTextLabelText(Trafike[id], 0xFF8000FF, string); return 1; }
Please guys help me!!!