MTA:SA LUA Scripting Tutorial 4 : LUA Introduction & Data Types

MTA:SA LUA Scripting Tutorial 4 : LUA Introduction & Data Types

Omarito

9 лет назад

2,441 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@dennislovete4757
@dennislovete4757 - 19.05.2021 05:01

Do you know how to decrypt lua?

Ответить
@OhhTrkshot
@OhhTrkshot - 18.12.2016 18:40

i did the exact same code as you, but it didnt work.

Ответить
@Omaritoo
@Omaritoo - 28.10.2015 19:46

+Parsa Rahimi Thanks a lot! the function varriables (also called arguments) are attached to the event handler itself there is a whole episode about functions and another one about event handlers anyway thePlayer is the player that typed the command and vehicleModel is the number followed by the command e.g: /createvehicle 455 so 455 is the vehicleModel

Ответить
@ΑντώνηςΚωνσταντινίδης-ρ4μ
@ΑντώνηςΚωνσταντινίδης-ρ4μ - 26.10.2015 22:08

That's great episode.. :D Thank you very much :D

Ответить
@parsarahimi335
@parsarahimi335 - 26.10.2015 12:32

EXCELLENT JOB, though your accent bothers me... start talking about functions because some of them are very confusing which I found on mtasa tutorial website like this one:

function createVehicleForPlayer(thePlayer, command, vehicleModel) <<<WHY WOULD YOU DEFINE 3 VARIABLES WHY ITS NO USE?
local x,y,z = getElementPosition(thePlayer) -- get the position of the player
x = x + 5 -- add 5 units to the x position
local createdVehicle = createVehicle(tonumber(vehicleModel),x,y,z)
-- check if the return value was ''false''
if (createdVehicle == false) then
-- if so, output a message to the chatbox, but only to this player.
outputChatBox("Failed to create vehicle.",thePlayer)
end
end
addCommandHandler("createvehicle", createVehicleForPlayer)

Ответить
@omarchida3963
@omarchida3963 - 26.10.2015 09:33

keep it up

Ответить
@cup3680
@cup3680 - 26.10.2015 09:32

Nice one

Ответить
@OmarChida
@OmarChida - 26.10.2015 09:32

GJ

Ответить
@abdokhaled3508
@abdokhaled3508 - 26.10.2015 09:20

good job 😄

Ответить