Wysłany: 2013-11-20, 20:12
RegEdit
Wiek: 28 Na forum: 5128 dni Posty: 16
Nick w MP: regedit
Piwa : 23
Sprawa prosta, mam mam tablic? z id pojazd?w z wiki mta i kiedy wpisz? np. /v sultan pokazuje ci?gle, ?e b??dny pojazd - co robi??
Kod: vehicleIDS = { 602, 545, 496, 517, 401, 410, 518, 600, 527, 436, 589, 580, 419, 439, 533, 549, 526, 491, 474, 445, 467, 604, 426, 507, 547, 585,
405, 587, 409, 466, 550, 492, 566, 546, 540, 551, 421, 516, 529, 592, 553, 577, 488, 511, 497, 548, 563, 512, 476, 593, 447, 425, 519, 520, 460,
417, 469, 487, 513, 581, 510, 509, 522, 481, 461, 462, 448, 521, 468, 463, 586, 472, 473, 493, 595, 484, 430, 453, 452, 446, 454, 485, 552, 431,
438, 437, 574, 420, 525, 408, 416, 596, 433, 597, 427, 599, 490, 432, 528, 601, 407, 428, 544, 523, 470, 598, 499, 588, 609, 403, 498, 514, 524,
423, 532, 414, 578, 443, 486, 515, 406, 531, 573, 456, 455, 459, 543, 422, 583, 482, 478, 605, 554, 530, 418, 572, 582, 413, 440, 536, 575, 534,
567, 535, 576, 412, 402, 542, 603, 475, 449, 537, 538, 441, 464, 501, 465, 564, 568, 557, 424, 471, 504, 495, 457, 539, 483, 508, 571, 500,
444, 556, 429, 411, 541, 559, 415, 561, 480, 560, 562, 506, 565, 451, 434, 558, 494, 555, 502, 477, 503, 579, 400, 404, 489, 505, 479, 442, 458,
606, 607, 610, 590, 569, 611, 584, 608, 435, 450, 591, 594 }
function vehicle(gracz, cmd, model)
if model ~= nil then
local idauta = getVehicleModelFromName(model)
local x, y, z = getElementPosition(gracz)
if vehicleIDS[idauta] then
createVehicle(vehicleIDS[idauta], x + 5, y, z)
outputChatBox("Stworzy?e? sobie pojazd.", gracz, 0, 255, 0)
else
outputChatBox("Z?a nazwa pojazdu!", gracz, 255, 0, 0)
end
end
end
addCommandHandler("v", vehicle)
Wysłany: 2013-11-20, 20:27
krydianero
Samotny Wilk
Wiek: 33 Na forum: 4783 dni Posty: 395
Nick w MP: Yoshida
Piwa : 1798
Ale ta tablica jest zb?dna...
function stworzauto ( player , cmd , auto )
local nauta = getVehicleModelFromName ( auto )
if nauta then
local x , y , z = getElementPosition ( player )
createVehicle ( nauta , x + 5 , y , z + 1 )
outputChatBox ( 'Stworzy?e? pojazd' , player )
else
outputChatBox ( 'Nie ma takiego pojazdu' , player )
end
end
end
addCommandHandler ( 'v' , stworzauto )
Podpis
Multi Drive Unlimited:Nowy projekt już wkrótce
Wysłany: 2013-11-20, 22:47
luki123luki123
Place Game
Wiek: 28 Na forum: 5275 dni Posty: 1948
Nick w MP: LuKiO
Piwa : 6101
vehicleIDS = { [ auto1 ] = 602 , [ auto2 ] = 545 , [ auto3 ] = 496 , [ auto4 ]= 517 , [ auto5 ] = 401 }
addCommandHandler ( "v" ,
function ( player , cmd , autoname )
local x , y , z = getElementPosition ( gracz )
if ( vehicleIDS [ autoname ]> 0 ) then
createVehicle ( player , vehicleIDS [ autoname ], x , y , z )
else
outputChatBox ( "Nie znaleziono podanej nazwy auta." , player )
end
end
)
Wysłany: 2013-11-21, 16:37
RegEdit
Wiek: 28 Na forum: 5128 dni Posty: 16
Nick w MP: regedit
Piwa : 23
luki123luki123 , rozwi?zanie krydianero jest lepsze, wszystko dzia?a - ale i tak dzi?ki!
Tagi: komenda :: stworzenie :: pojazdu.
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: