function Vehicle_OnProduce(vech, plyr, menuitem) -- vehicle, player, integer local vid = vech:vehicletypeid() local check = trainCheck() g_arena:message("'Vehicle_OnProduce' called by " .. plyr.m_name .. " with vid " .. vid .. " and menu item " .. menuitem) if (vid == 411) then if (menuitem == 0) then plyr:message("Command Training requires 20,000 Experince and 15,000 credits.") trainCheck(20000, 15000, plyr, "Command Training") if (check == {true, true, true}) then plyr:message("Have your Training."); return true elseif (check == {true, true, false}) then plyr:message("You have already been trained in this, you cannot learn anything else.") return false elseif (check == {true, false, false}) then plyr:message("You need 15,000 Credits, you only have " .. plyr.getCash() .. ".") return false elseif (check == {false, false, false}) then plyr:message("You need 20,000 Experience, you only have " .. plyr.getExperience() .. ".") plyr:message("You need 15,000 Credits, you only have " .. plyr.getCash() .. ".") return false end elseif (menuitem == 1) then return true end end end