Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: przeróbka
1. Przeróbka na MYSQL
Cze?? to ja poraz enty :D Jednak zmieni?em zdanie robienia pod ACL, do robienia pod My Sql zach?ci? mnie u?ytkownik Thinks. Sam to przemy?la?a?em i chc? si? tego nauczy? czy by?cie mogli mi wyt?umaczy? jak podpi?? ten skrypt pod My Sql? [lua]--[[
Autor skryptu: Wilq,SpajkY
ZAKAZ KOPIOWANIA BO CI NA KOMPA WBIJE
--]]


--Salon LS Mo?esz edytowa?
local auto1 = createVehicle(602, 1474.76, -1723.68, 13.23, 360.0, 360.0, 146.9)
setElementData(auto1, "cena", 10000)
setElementData(auto1, "wSalonie", true)
setElementFrozen(auto1, true)
setVehicleEngineState(auto1, false)
setVehicleColor(auto1, 255, 255, 255)

-- Tu ju? lepiej nie
addEventHandler("onVehicleEnter", resourceRoot, function(plr, seat, jacked)
if not getElementData(source, "wSalonie") then return end
if jacked then cancelEvent() return end
outputChatBox("Koszt pojazdu wynosi: " .. getElementData(source, "cena") .. "$, wpisz /kupauto aby je zakupi?", plr)
end)
-- Tu lepiej te? nie opr?cz koordynat?w
addCommandHandler("kupauto", function(plr)
local veh = getPedOccupiedVehicle(plr)
if not veh or not getElementData(veh, "wSalonie") then outputChatBox("Nie jeste? w poje?dzie na sprzeda?!", plr) return end
if not getElementData(veh, "cena") then return end
outputChatBox("Kupi?e? pojazd marki " .. getVehicleName(veh) .. ", grat...
2. [GF] Przeróbka Tankowania
Cze??. Mam standardowy kod /tankuj kt?ry tankuje do pe?na. Ja chce zrobi? tak, aby po wpisaniu /tankuj by?o GUI i ?eby mo?na by?o wpisa? ilo?? litr?w, a je?eli puste to do pe?na. I nie wiem jak to zrobi? w?a?nie, podaje m?j kod:

[code]public Fillup()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new VID;
new FillUp;
new string[64];
VID = GetPlayerVehicleID(i);
FillUp = GasMax - Gas[VID];
if(Refueling[i] == 1)
{
if(GetPlayerMoney(i) >= FillUp+4)
{
Gas[VID] += FillUp;
FillUp = FillUp * SBizzInfo[3][sbEntranceCost];
format(string,sizeof(string),"~w~Zatankowales pojazd za:~n~~g~ $%d.",FillUp*3.89);
GameTextForPlayer(i, string, 5000, 3);
GiveCash(i, - FillUp);
SBizzInfo[3][sbTill] += FillUp;
ExtortionSBiz(3, FillUp);
Refueling[i] = 0;
}
else
{
format(string,sizeof(string),"~w~Nie posiadasz kwoty: ~n~$~g~%d.",FillUp);
GameTextForPlayer(i, string, 5000, 3);
}
}
}
}
return 1;
}





if(strcmp(cmd, "/tankuj", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(IsAtGasStation(playerid))
{
GameTextForPlayer(playerid,"~w~~n~~n~~n~~n~~n~~n~~n~~n~~n~Tankowanie pojazdu, prosze czekac",2000,3);
SetTimer("Fillup",RefuelWait,0);
Refueling[playerid] = 1;
}
else
{
SendClient...
3. Auta frakcji - przeróbka
Kod:

policeVehicles = { [598]=true, [596]=true, [597]=true, [599]=true, [497]=true }
policeSkins = { [280]=true, [281]=true, [282]=true, [283]=true, [284]=true, [285]=true, [286]=true }

function enterVehicle ( theVehicle, seat, jacked )
if ( policeVehicles[getElementModel ( theVehicle )] ) and ( not policeSkins[getElementModel ( source )] ) then
removePedFromVehicle ( source )
outputChatBox ( "- Tylko policjanci mog? wchodzi? do pojazd?w policji.", source, 255, 255, 0 )
end
end
addEventHandler ( "onPlayerVehicleEnter", getRootElement(), enterVehicle )


Jak to przerobi?, ?eby tylko po wej?ciu na fotel kierowcy wyrzuca?o z auta?