I created a simple script, but in its serve side it doesn’t display the print command in the console
fxmanifest
fx_version "cerulean"
game "gta5"
lua54 "yes"
client_scripts {
"@vrp/lib/utils.lua",
"client-side/*"
}
server_scripts {
"@vrp/lib/utils.lua",
"server-side/*"
}
server-side
RegisterCommand("jaqueta",function(source,args,rawCommand)
local source = source
local user_id = vRP.getUserId(source)
print("Test")
if user_id and vRP.getHealth(source) > 101 then
if vRP.getInventoryItemAmount(user_id,"roupas")[1] >= 1 then
TriggerClientEvent("setjaqueta",source,args[1],args[2])
end
end
end)
client-side
RegisterNetEvent('setjaqueta')
AddEventHandler('setjaqueta',function(modelo,cor)
print("Test")
local ped = PlayerPedId()
if GetEntityHealth(ped) > 101 then
if not modelo then
vRP.playAnim(true,{{"clothingshirt","try_shirt_positive_d"}},false)
Wait(2500)
ClearPedTasks(ped)
SetPedComponentVariation(ped,11,15,0,2)
TriggerEvent("skinshop:updateRoupas",source)
return
end
if GetEntityModel(ped) == GetHashKey("mp_m_freemode_01") then
vRP.playAnim(true,{"clothingtie","try_tie_negative_a"},false)
Wait(2500)
ClearPedTasks(ped)
SetPedComponentVariation(ped,11,parseInt(modelo),parseInt(cor),2)
TriggerEvent("skinshop:updateRoupas",source)
elseif GetEntityModel(ped) == GetHashKey("mp_f_freemode_01") then
vRP.playAnim(true,{"clothingtie","try_tie_negative_a"},false)
Wait(2500)
ClearPedTasks(ped)
SetPedComponentVariation(ped,11,parseInt(modelo),parseInt(cor),2)
TriggerEvent("skinshop:updateRoupas",source)
end
end
end)
The command takes me to my client side, runs my code and gives me the expected result. In the client part, the print command with my result is displayed in the in-game console
Despite the expected result, the console, when related to something on the serve side, did not display an error or any kind of screenshot that I put in.