Wysłany: 2015-06-29, 17:53
mixLoLmix2
Programista
Wiek: 35 Na forum: 4113 dni Posty: 454
Nick w MP: TomeQmix
Piwa : 1915
Witam mozecie mi poprawic kod?
Chodzi oto ze po wpisaniu /dajmecha nick ma da? do grupy acl Mechanik
a /zabierzmecha nick usuwa z acl Mechanik
Bo jak pisze to nic niema
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName , aclGetGroup ( "Vmech" ) ) then
if accountName then
local pl = getPlayerFromName ( accountName )
if pl then
local account = getPlayerAccount ( pl )
local acc = getAccountName ( account )
aclGroupAddObject ( aclGetGroup ( "Mechanik" ), "user." .. acc )
outputChatBox ( 'Da?es Mechanika' , thePlayer )
else
outputChatBox ( 'Podany nick jest nieprawid?owy !' , thePlayer )
end
end
end
end
addCommandHandler ( 'damecha' , dajMecha )
addCommandHandler ( 'zabierzmecha' ,function( plr , cmd , accountName )
if accountName then
local player = getPlayerFromName ( accountName )
local account = getPlayerAccount ( player )
local accName = getAccountName ( account )
aclGroupRemoveObject ( aclGetGroup ( "Mechanik" ), "user." .. accName )
outputChatBox ( 'Zabra?es Mechanika' , thePlayer )
else
outputChatBox ( 'Podany nick jest nieprawid?owy !' , thePlayer )
end
end )
Wysłany: 2015-06-30, 00:04
Maximerr
Programmer PHP, LUA
Wiek: 25 Na forum: 4427 dni Posty: 548
Piwa : 1051
mixLoLmix2 , to jest jaki? wyci?ty kod. Nawet funkcji zacz?tej nie ma, sprawd? czy dobrze wklei?e?. Po drugie, zauwa?, ?e masz komende '/damecha'.
Wysłany: 2015-06-30, 16:45
mixLoLmix2
Programista
Wiek: 35 Na forum: 4113 dni Posty: 454
Nick w MP: TomeQmix
Piwa : 1915
no wiem potem zauwazy?em ze jest damecha ale nadal niema
Tak kod jest wyci?ty z innego skryptu.
Podpis
Zajmuję się pisaniem zaawansowanych skryptów lua na zamówienie za bardzo niską cene.
Oraz pomoc przy serwerze mta/forum i tym podobnych.
Discord: TomeQmix#7106
Wysłany: 2015-06-30, 17:37
luki123luki123
Place Game
Wiek: 28 Na forum: 5275 dni Posty: 1948
Nick w MP: LuKiO
Piwa : 6101
mixLoLmix2 , podaj pe?ny kod tych funkcji
Wysłany: 2015-06-30, 18:30
mixLoLmix2
Programista
Wiek: 35 Na forum: 4113 dni Posty: 454
Nick w MP: TomeQmix
Piwa : 1915
prawojazdykatb = { [ 401 ]= true , [ 402 ]= true , [ 410 ]= true , [ 411 ]= true , [ 412 ]= true , [ 415 ]= true , [ 419 ]= true , [ 422 ]= true , [ 423 ]= true , [ 424 ]= true ,
[ 429 ]= true , [ 434 ]= true , [ 436 ]= true , [ 439 ]= true , [ 444 ]= true , [ 451 ]= true , [ 467 ]= true , [ 474 ]= true , [ 475 ]= true , [ 477 ]= true , [ 478 ]= true , [ 480 ]= true ,
[ 489 ]= true , [ 491 ]= true , [ 494 ]= true , [ 495 ]= true , [ 496 ]= true , [ 500 ]= true , [ 502 ]= true , [ 503 ]= true , [ 504 ]= true , [ 505 ]= true , [ 506 ]= true , [ 508 ]= true ,
[ 517 ]= true , [ 518 ]= true , [ 525 ]= true , [ 526 ]= true , [ 527 ]= true , [ 533 ]= true , [ 534 ]= true , [ 535 ]= true , [ 536 ]= true , [ 541 ]= true , [ 542 ]= true , [ 543 ]= true ,
[ 545 ]= true , [ 549 ]= true , [ 552 ]= true , [ 554 ]= true , [ 555 ]= true , [ 558 ]= true , [ 559 ]= true , [ 562 ]= true , [ 565 ]= true , [ 568 ]= true , [ 574 ]= true , [ 575 ]= true ,
[ 576 ]= true , [ 587 ]= true , [ 589 ]= true , [ 600 ]= true , [ 602 ]= true , [ 603 ]= true }
function prawoKatB ( thePlayer , seat , jacked )
if seat == 0 then
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if ( prawojazdykatb [ getElementModel ( source )] ) and not isObjectInACLGroup ( 'user.' .. playerName , aclGetGroup ( "PJKB" ) ) then
cancelEvent ()
outputChatBox ( "Panie! Potrzebne ci Prawko Kart.B" , thePlayer )
end
end
end
addEventHandler ( 'onVehicleStartEnter' , root , prawoKatB )
function dajPrawkoB ( thePlayer , commandName , accountName )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName , aclGetGroup ( "RCON" ) ) then
if accountName then
local pl = getPlayerFromName ( accountName )
if pl then
local account = getPlayerAccount ( pl )
local acc = getAccountName ( account )
aclGroupAddObject ( aclGetGroup ( "PJKB" ), "user." .. acc )
outputChatBox ( 'Wyda?e? prawo jazdy' , thePlayer )
else
outputChatBox ( 'Podany nick jest nieprawid?owy !' , thePlayer )
end
end
end
end
addCommandHandler ( 'dajprawkob' , dajPrawkoB )
addCommandHandler ( 'zabierzprawkob' ,function( plr , cmd , accountName )
if accountName then
local player = getPlayerFromName ( accountName )
local account = getPlayerAccount ( player )
local accName = getAccountName ( account )
aclGroupRemoveObject ( aclGetGroup ( "PJKB" ), "user." .. accName )
outputChatBox ( 'Zabra?es Prawko' , thePlayer )
else
outputChatBox ( 'Podany nick jest nieprawid?owy !' , thePlayer )
end
end )
Podpis
Zajmuję się pisaniem zaawansowanych skryptów lua na zamówienie za bardzo niską cene.
Oraz pomoc przy serwerze mta/forum i tym podobnych.
Discord: TomeQmix#7106
Tagi: mechanik
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: