Wysłany: 2015-07-13, 16:33
sebik2303
Mapper :)
Wiek: 25 Na forum: 4160 dni Posty: 298
Nick w MP: sebik2303
Piwa : 899
Witam, chcia?bym przerobi? sw?j skrypt na tuning, lecz ma par? wad i musz? je zlikwidowa? Dam kod
function addwheels ( sourcePlayer , command )
theVehicle = getPlayerOccupiedVehicle ( sourcePlayer )
if ( theVehicle ) then
addVehicleUpgrade ( theVehicle , 1098 )
takePlayerMoney ( sourcePlayer , 7000 )
outputChatBox ( "Zamontowano cz??? w poje?dzie." , source , 255 , 255 , 255 , true )
end
end
addCommandHandler ( "dodaj.access" , addwheels )
function remwheels ( sourcePlayer , command )
theVehicle = getPlayerOccupiedVehicle ( sourcePlayer )
if ( theVehicle ) then
removeVehicleUpgrade ( theVehicle , 1098 )
givePlayerMoney ( sourcePlayer , 7000 )
outputChatBox ( "Zdemontowano Cz??? w poje?dzie." , source , 255 , 255 , 255 , true )
end
end
addCommandHandler ( "usun.access" , remwheels )
Wi?c chcia?bym da? aby tylko w markerze dzia?a?o. Wi?c na pocz?tku skryptu musz? dopisa? :
mech_marker = createMarker (- 145.81640625 , 1165.3720703125 , 19.795249938965 , "cylinder" , 0 , 0 , 0 , 0 , 130 )
( Chyba tak jak co? ?le da?em prosz? mnie poprawi? )
Chcia?bym te? aby tylko ACL mia? Mech_FC
if not isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( plr )), aclGetGroup ( "Mechanik_FC" ) )
( Chyba tak jak co? ?le da?em prosz? mnie poprawi? )
•Oraz jak kto? ma kas? poni?ej 0 to nie mo?e zamontowa?
•Oraz je?eli jest ju? tune to nie mo?e go 2 raz zamontowa?
Za pomoc daj?
Wysłany: 2015-07-13, 16:55
Maximerr
Programmer PHP, LUA
Wiek: 25 Na forum: 4427 dni Posty: 548
Piwa : 1051
Nie wiem czy o to Ci chodzi?o.
mech_marker = createMarker (- 145.81640625 , 1165.3720703125 , 19.795249938965 , "cylinder" , 0 , 0 , 0 , 0 , 130 )
function addwheels ( sourcePlayer , command )
if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( sourcePlayer )), aclGetGroup ( "Mechanik_FC" ) ) then
if isObjectWithinMarker ( sourcePlayer , mech_marker ) then
theVehicle = getPlayerOccupiedVehicle ( sourcePlayer )
if ( theVehicle ) then
addVehicleUpgrade ( theVehicle , 1098 )
takePlayerMoney ( sourcePlayer , 7000 )
outputChatBox ( "Zamontowano cz??? w poje?dzie." , source , 255 , 255 , 255 , true )
end
end
end
end
addCommandHandler ( "dodaj.access" , addwheels )
function remwheels ( sourcePlayer , command )
if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( sourcePlayer )), aclGetGroup ( "Mechanik_FC" ) ) then
if isObjectWithinMarker ( sourcePlayer , mech_marker ) then
theVehicle = getPlayerOccupiedVehicle ( sourcePlayer )
if ( theVehicle ) then
removeVehicleUpgrade ( theVehicle , 1098 )
givePlayerMoney ( sourcePlayer , 7000 )
outputChatBox ( "Zdemontowano Cz??? w poje?dzie." , source , 255 , 255 , 255 , true )
end
end
end
end
addCommandHandler ( "usun.access" , remwheels )
Wysłany: 2015-07-13, 18:04
sebik2303
Mapper :)
Wiek: 25 Na forum: 4160 dni Posty: 298
Nick w MP: sebik2303
Piwa : 899
Mam 1 DB3
[ Dodano : 2015-07-13, 18:10 ]
Dodam i? 9 linijka to
if isObjectWithinMarker ( sourcePlayer , mech_marker ) then
Wysłany: 2015-07-13, 18:35
Maximerr
Programmer PHP, LUA
Wiek: 25 Na forum: 4427 dni Posty: 548
Piwa : 1051
marker = createMarker (- 145.81640625 , 1165.3720703125 , 19.795249938965 , "cylinder" , 0 , 0 , 0 , 0 , 130 )
function addwheels ( sourcePlayer , command )
if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( sourcePlayer )), aclGetGroup ( "Mechanik_FC" ) ) then
if isElementWithinMarker ( sourcePlayer , marker ) then
theVehicle = getPlayerOccupiedVehicle ( sourcePlayer )
if ( theVehicle ) then
addVehicleUpgrade ( theVehicle , 1098 )
takePlayerMoney ( sourcePlayer , 7000 )
outputChatBox ( "Zamontowano cz??? w poje?dzie." , source , 255 , 255 , 255 , true )
end
end
end
end
addCommandHandler ( "dodaj.access" , addwheels )
function remwheels ( sourcePlayer , command )
if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( sourcePlayer )), aclGetGroup ( "Mechanik_FC" ) ) then
if isElementWithinMarker ( sourcePlayer , marker ) then
theVehicle = getPlayerOccupiedVehicle ( sourcePlayer )
if ( theVehicle ) then
removeVehicleUpgrade ( theVehicle , 1098 )
givePlayerMoney ( sourcePlayer , 7000 )
outputChatBox ( "Zdemontowano Cz??? w poje?dzie." , source , 255 , 255 , 255 , true )
end
end
end
end
addCommandHandler ( "usun.access" , remwheels )
Ostatnio zmieniony przez Maximerr 2015-07-13, 21:42, w całości zmieniany 1 raz
Wysłany: 2015-07-13, 21:36
Tostuch
Wiek: 27 Na forum: 4931 dni Posty: 483
Nick w MP: Tost
Piwa : 137
isElementWithinMarker* dziwi? si? ?e DB3 nie wywali?o od razu b??du
Wysłany: 2015-07-13, 21:42
Maximerr
Programmer PHP, LUA
Wiek: 25 Na forum: 4427 dni Posty: 548
Piwa : 1051
Tostuch , ah, rzeczywi?cie. Ju? poprawiam.
Tagi: tuning :: pojazdu
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: